Built-in Module syslog

syslog

This module provides an interface to the Unix syslog library routines. Refer to the manual pages for a detailed description of the syslog facility.

The module defines the following functions:


\begin{funcdesc}{syslog}{\optional{priority\,} message}
Send the string \var{mes...
...code{(LOG_USER \vert LOG_INFO)}, determines the message priority.
\end{funcdesc}


\begin{funcdesc}{openlog}{ident\, \optional{logopt\, \optional{facility}}}
Loggi...
...ity for messages
which do not have a facility explicitly encoded.
\end{funcdesc}


\begin{funcdesc}{closelog}{}
Close the log file.
\end{funcdesc}


\begin{funcdesc}{setlogmask}{maskpri}
This function set the priority mask to \va...
...ulates the mask for all priorities
up to and including \var{pri}.
\end{funcdesc}

The module defines the following constants:

Priority levels (high to low):

LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG.

Facilities:

LOG_KERN, LOG_USER, LOG_MAIL, LOG_DAEMON, LOG_AUTH, LOG_LPR, LOG_NEWS, LOG_UUCP, LOG_CRON and LOG_LOCAL0 to LOG_LOCAL7.

Log options:

LOG_PID, LOG_CONS, LOG_NDELAY, LOG_NOWAIT and LOG_PERROR if defined in syslog.h.