PMDF Programmer's Reference Manual


Previous Contents Index


PMDFlog

Write a line of text to the channel log file.

PASCAL

status = PMDF_log (text, time_stamp)

argument information

Argument Data type Access Mechanism
text descriptor read reference
time_stamp boolean read value

C

status = PMDFlog (text, text_len, time_stamp)

argument information


int PMDFlog(char     *text, 
            int       text_len, 
            int       time_stamp) 


Arguments

text

String of text to write to the log file. Cannot exceed a length of 65,535 bytes.

text_len

Length in bytes of text.

time_stamp

When true, output a time stamp to the log file prior to writing out the text string.

Description

Channels written using the PMDF API should write output using PMDFlog . They should not, for instance, attempt to write to stdout or stderr . So doing will lead to the output going to unexpected places such as the job controller's log file or down a network connection. The PMDF_log routine writes text to the correct output destination; e.g., the channel's log file or the terminal if the channel is running interactively. If debugging has been enabled with PMDFdebug , then the output will go to the same destination as the PMDF debugging output. When time_stamp is true, a time stamp will first be output. For example, the call


PMDF_log("Resuming message processing", true); 
would result in output similar to


04-MAY-2012 18:04:00: Resuming message processing 
Note that the channel log file is distinct from the PMDF log file. The PMDFcloseLogFile routine closes the PMDF log file and not the channel log file.


Return Values

PMDF__OK Normal, successful completion.
PMDF__INVSTRDES Invalid string descriptor for text: descriptor has an invalid value in its DSC$B_CLASS field. Text not written.
PMDF__STRTRU Input string's length exceeded 65,535 bytes; only the first 65,535 bytes were output.


Previous Next Contents Index