2 .\" Copyright (c) 2013 Gary Mills
3 .\" Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
4 .\" Copyright (c) 1983 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
5 .TH SYSLOG.CONF 4 "Nov 19, 2013"
7 syslog.conf \- configuration file for syslogd system log daemon
11 \fB/etc/syslog.conf\fR
16 The file \fB/etc/syslog.conf\fR contains information used by the system log
17 daemon, \fBsyslogd\fR(1M), to forward a system message to appropriate log files
18 and/or users. \fBsyslogd\fR preprocesses this file through \fBm4\fR(1) to
19 obtain the correct information for certain log files, defining \fBLOGHOST\fR if
20 the address of "loghost" is the same as one of the addresses of the host that
21 is running \fBsyslogd\fR.
24 A configuration entry is composed of two TAB-separated fields:
34 The \fIselector\fR field contains a semicolon-separated list of priority
35 specifications of the form:
39 \fIfacility\fR\fB\&.\fR\fIlevel\fR [ \fB;\fR \fIfacility\fR\fB\&.\fR\fIlevel\fR ]
45 where \fIfacility\fR is a system facility, or comma-separated list of
46 facilities, and \fIlevel\fR is an indication of the severity of the condition
48 The presence of a facility name only implies that it is available.
49 Each individual service determines which facility it will use for logging.
50 In particular, many facilities are only useful for \fBsyslog\fR messages
51 that are forwarded from other operating systems.
52 Recognized values for \fIfacility\fR include:
59 Messages generated by the kernel.
68 Messages generated by user processes. This is the default priority for messages
69 from programs or facilities not listed in this file.
87 Various system daemons.
96 The authorization system: \fBlogin\fR(1), \fBsu\fR(1M), \fBgetty\fR(1M), among
106 The line printer spooling system: \fBlpr\fR(1B), \fBlpc\fR(1B), among others.
115 Designated for the USENET network news system.
124 Designated for the UUCP system; it does not currently use the \fBsyslog\fR
134 Designated for the BSD cron/at system.
143 Designated for the BSD security/authorization system.
152 Designated for the file transfer system.
161 Designated for the network time system.
170 Designated for audit messages generated by systems that audit by means of
180 Designated for the BSD console system.
189 Designated for \fBcron\fR/\fBat\fR messages generated by systems that do
190 logging through \fBsyslog\fR.
191 The current versions of \fBcron\fR and \fBat\fR do not use this facility
201 Designated for local use.
210 For timestamp messages produced internally by \fBsyslogd\fR.
219 An asterisk indicates all facilities except for the \fBmark\fR facility.
224 Recognized values for \fIlevel\fR are (in descending order of severity):
231 For panic conditions that would normally be broadcast to all users.
240 For conditions that should be corrected immediately, such as a corrupted system
250 For warnings about critical conditions, such as hard device errors.
268 For warning messages.
277 For conditions that are not error conditions, but may require special handling.
278 A configuration entry with a \fIlevel\fR value of \fBnotice\fR must appear on a
288 Informational messages.
297 For messages that are normally used only when debugging a program.
306 Do not send messages from the indicated \fIfacility\fR to the selected file.
307 For example, a \fIselector\fR of
309 \fB*.debug;mail.none\fR
311 sends all messages \fIexcept\fR mail messages to the selected file.
316 For a given \fIfacility\fR and \fIlevel\fR, \fBsyslogd\fR matches all messages
317 for that level and all higher levels. For example, an entry that specifies a
318 level of \fBcrit\fR also logs messages at the \fBalert\fR and \fBemerg\fR
322 The \fIaction\fR field indicates where to forward the message. Values for this
323 field can have one of four forms:
328 A filename, beginning with a leading slash, which indicates that messages
329 specified by the \fIselector\fR are to be written to the specified file. The
330 file is opened in append mode if it exists. If the file does not exist, logging
331 silently fails for this action.
337 The name of a remote host, prefixed with an \fB@\fR, as with:
338 \fB@\fR\fIserver\fR, which indicates that messages specified by the
339 \fIselector\fR are to be forwarded to the \fBsyslogd\fR on the named host. The
340 hostname "loghost" is treated, in the default \fBsyslog.conf\fR, as the
341 hostname given to the machine that logs \fBsyslogd\fR messages. Every machine
342 is "loghost" by default, per the hosts database. It is also possible to specify
343 one machine on a network to be "loghost" by, literally, naming the machine
344 "loghost". If the local machine is designated to be "loghost", then
345 \fBsyslogd\fR messages are written to the appropriate files. Otherwise, they
346 are sent to the machine "loghost" on the network.
352 A comma-separated list of usernames, which indicates that messages specified by
353 the \fIselector\fR are to be written to the named users if they are logged in.
359 An asterisk, which indicates that messages specified by the \fIselector\fR are
360 to be written to all logged-in users.
364 Blank lines are ignored. Lines for which the first nonwhite character is
365 a '\fB#\fR' are treated as comments.
368 \fBExample 1 \fRA Sample Configuration File
371 With the following configuration file:
379 \fB*.notice\fR \fB/var/log/notice\fR
380 \fBmail.info\fR \fB/var/log/notice\fR
381 \fB*.crit\fR \fB/var/log/critical\fR
382 \fBkern,mark.debug\fR \fB/dev/console\fR
383 \fBkern.err\fR \fB@server\fR
384 \fB*.emerg\fR \fB*\fR
385 \fB*.alert\fR \fBroot,operator\fR
386 \fB*.alert;auth.warning\fR \fB/var/log/auth\fR
391 \fBsyslogd\fR(1M) logs all mail system messages except \fBdebug\fR messages and
392 all \fBnotice\fR (or higher) messages into a file named \fB/var/log/notice\fR.
393 It logs all critical messages into \fB/var/log/critical\fR, and all kernel
394 messages and 20-minute marks onto the system console.
398 Kernel messages of \fBerr\fR (error) severity or higher are forwarded to the
399 machine named \fBserver\fR. Emergency messages are forwarded to all users. The
400 users \fBroot\fR and \fBoperator\fR are informed of any \fBalert\fR messages.
401 All messages from the authorization system of \fBwarning\fR level or higher are
402 logged in the file \fB/var/log/auth\fR.
406 See \fBattributes\fR(5) for descriptions of the following attributes:
414 ATTRIBUTE TYPE ATTRIBUTE VALUE
416 Interface Stability Stable
421 \fBat\fR(1), \fBcrontab\fR(1), \fBlogger\fR(1), \fBlogin\fR(1), \fBlp\fR(1),
422 \fBlpc\fR(1B), \fBlpr\fR(1B), \fBm4\fR(1), \fBcron\fR(1M), \fBgetty\fR(1M),
423 \fBin.ftpd\fR(1M), \fBsu\fR(1M), \fBsyslogd\fR(1M), \fBsyslog\fR(3C),
424 \fBhosts\fR(4), \fBattributes\fR(5)