syslog.3c (2010 09)
s
syslog(3C) syslog(3C)
descriptors are allocated.
LOG_NOWAIT Do not wait for children forked to log messages on the console.
This option should be used by processes that enable
notification of child termination via SIGCLD
, because sys-
log() might otherwise block, waiting for a child whose exit
status has already been collected.
facility encodes a default facility to be assigned to all messages written subsequently by
syslog() with no explicit facility encoded.
LOG_KERN Messages generated by the kernel. These cannot be generated
by any user processes.
LOG_USER Messages generated by random user processes. This is the
default facility identifier if none is specified.
LOG_MAIL The mail system.
LOG_DAEMON System daemons, such as inetd (1M), ftpd (1M), etc.
LOG_AUTH The authorization system: login(1), su(1), getty (1M), etc.
LOG_SYSLOG Messages generated internally by syslogd daemon.
LOG_LPR The line printer spooling system: lp(1), lpsched (1M), etc.
LOG_NEWS Messages generated by the news system.
LOG_UUCP Messages generated by the UUCP system.
LOG_CRON Messages generated by the CRON daemon.
LOG_LOCAL0 Reserved for local use. Similarly for LOG_LOCAL1 through
LOG_LOCAL7.
facility and level uses an encoded code for logging in
syslogd message. The encoded
code for facility and level are as follows.
LOG_KERN A LOG_EMERG 0
LOG_USER B LOG_ALERT 1
LOG_MAIL C LOG_CRIT 2
LOG_DAEMON D LOG_ERR 3
LOG_AUTH E LOG_WARNING 4
LOG_SYSLOG F LOG_NOTICE 5
LOG_LPR G LOG_INFO 6
LOG_NEWS H LOG_DEBUG 7
LOG_UUCP I
LOG_CRON J
LOCAL0-7 Q-X
closelog() closes the log file.
setlogmask()
sets the log priority mask to maskpri and returns the previous mask. Calls to sys-
log() with a priority not set in maskpri are rejected. The mask for an individual prior-
ity pri is calculated by the macro LOG_MASK(pri); the mask for all priorities up to and
including toppri is given by the macro LOG_UPTO(toppri ). By default, all priorities are
logged.
ERRORS
syslog fails if any of the following conditions are encountered:
[EAGAIN] The named pipe
/dev/log is blocked for writing.
[ENOENT] The named pipe
/dev/log bold) could not be opened successfully.
2 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: September 2010