syslog, openlog, closelog -- control system log
syslog(priority, message, parameters ... )
The message is tagged with
is replaced by the current error message
A trailing newline is added if needed.
This message will be read by
and output to the system console or files as appropriate.
If special processing is needed,
can be called to initialize the log file.
which is prepended to every message,
a bit field indicating special status;
.IP LOG_PID \w'LOG_PID'u+3
log the process id with each message:
useful for identifying instantiations of daemons.
If it cannot open the file
can be used to close the log file.
syslog(LOG_SALERT, "who: internal error 23");
openlog("serverftp", LOG_PID);
syslog(LOG_INFO, "Connection from host %d", CallingHost);