SYSLOG.CONF(5) | File Formats and Configurations | SYSLOG.CONF(5) |
syslog.conf - configuration file for syslogd system log daemon
/etc/syslog.conf
The file /etc/syslog.conf contains information used by the system log daemon, syslogd(8), to forward a system message to appropriate log files and/or users. syslogd preprocesses this file through m4(1) to obtain the correct information for certain log files, defining LOGHOST if the address of "loghost" is the same as one of the addresses of the host that is running syslogd.
A configuration entry is composed of two TAB-separated fields:
selector action
The selector field contains a semicolon-separated list of priority specifications of the form:
facility.level [ ; facility.level ]
where facility is a system facility, or comma-separated list of facilities, and level is an indication of the severity of the condition being logged. The presence of a facility name only implies that it is available. Each individual service determines which facility it will use for logging. In particular, many facilities are only useful for syslog messages that are forwarded from other operating systems. Recognized values for facility include:
kern
user
daemon
auth
lpr
news
uucp
altcron
authpriv
ftp
ntp
audit
console
cron
local0-7
mark
*
Recognized values for level are (in descending order of severity):
emerg
alert
crit
err
warning
notice
info
debug
none
*.debug;mail.none
sends all messages except mail messages to the selected file.
For a given facility and level, syslogd matches all messages for that level and all higher levels. For example, an entry that specifies a level of crit also logs messages at the alert and emerg levels.
The action field indicates where to forward the message. Values for this field can have one of four forms:
Blank lines are ignored. Lines for which the first nonwhite character is a '#' are treated as comments.
Example 1 A Sample Configuration File
With the following configuration file:
*.notice | /var/log/notice |
mail.info | /var/log/notice |
*.crit | /var/log/critical |
kern,mark.debug | /dev/console |
kern.err | @server |
*.emerg | * |
*.alert | root,operator |
*.alert;auth.warning | /var/log/auth |
syslogd(8) logs all mail system messages except debug messages and all notice (or higher) messages into a file named /var/log/notice. It logs all critical messages into /var/log/critical, and all kernel messages and 20-minute marks onto the system console.
Kernel messages of err (error) severity or higher are forwarded to the machine named server. Emergency messages are forwarded to all users. The users root and operator are informed of any alert messages. All messages from the authorization system of warning level or higher are logged in the file /var/log/auth.
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Stable |
at(1), crontab(1), logger(1), login(1), lp(1), m4(1), lpc(1B), lpr(1B), syslog(3C), hosts(5), attributes(7), cron(8), getty(8), in.ftpd(8), su(8), syslogd(8)
November 19, 2013 | OmniOS |