FUNCTION c_wrtlog(logfile, key, code, text)
char *logfile; char *key; char *code; char *text;
The host name of the log file to write to.
Key to be written to the log file. The key identifies what the program was working on (for example, the name of the image being processed).
Operation code of the message. The code indicates the event that just occurred within a program.
Descriptive text, a fuller explanation of the event that was logged.
The c_wrtlog() routine is used to write a message to the named log file. The log file is locked, the message is written to the file, and the file is unlocked. The message is in the format:
key date time code textThe following is an example of what might be written to a log file:
namerica 05/28/93 08:17:55 bwtrans Completed the browse transfer
c_wrtlog() returns
E_SUCC (0) --> successful write of log message E_FAIL (-1) --> log file could not be opened or appended to