PMDF Programmer's Reference Manual
PMDF-PRM-6.0


Previous | Contents

PMDF_log

Write a line of text to the channel log file.

VMS FORMAT

status = PMDF_log (text, time_stamp)

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

C FORMAT

status = PMDFlog (text, text_len, time_stamp)

argument information
int PMDFlog (text, text_len, time_stamp) 
         char     *text; 
         int       text_len; 
         int       time_stamp 

ARGUMENTS

text

String of text to write to the log file. May not 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 PMDF_log. 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 PMDF_debug, 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
 1-AUG-94 10:28:53: Resuming message processing 
Note that the channel log file is distinct from the PMDF log file. The PMDF_close_log_file 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