1 .\" Copyright (c) 1990, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93
45 file is the configuration file for the
48 It consists of lines with two fields: the
50 field which specifies the types of messages and priorities to which the
53 field which specifies the action to be taken if a message
55 receives matches the selection criteria.
58 field is separated from the
60 field by one or more tab characters.
67 a period (``.''), and a
69 with no intervening white-space.
78 describes the part of the system generating the message, and is one of
79 the following keywords: auth, authpriv, cron, daemon, kern, lpr, mail,
80 mark, news, syslog, user, uucp and local0 through local7.
81 These keywords (with the exception of mark) correspond to the
84 values specified to the
92 describes the severity of the message, and is a keyword from the
93 following ordered list (higher to lower): emerg, alert, crit, err,
94 warning, notice and debug.
95 These keywords correspond to the
98 values specified to the
104 for a further descriptions of both the
108 keywords and their significance.
110 If a received message matches the specified
112 and is of the specified
114 .Em (or a higher level) ,
115 the action specified in the
121 may be specified for a single
123 by separating them with semicolon (``;'') characters.
124 It is important to note, however, that each
126 can modify the ones preceding it.
130 may be specified for a single
132 by separating them with comma (``,'') characters.
134 An asterisk (``*'') can be used to specify all
141 ``mark'' receives a message at priority ``info'' every 20 minutes
144 This is not enabled by a
146 field containing an asterisk.
150 ``none'' disables a particular
155 field of each line specifies the action to be taken when the
157 field selects a message.
158 There are four forms:
161 A pathname (beginning with a leading slash).
162 Selected messages are appended to the file.
164 A hostname (preceded by an at (``@'') sign).
165 Selected messages are forwarded to the
167 program on the named host.
169 A comma separated list of users.
170 Selected messages are written to those users
171 if they are logged in.
174 Selected messages are written to all logged-in users.
177 Blank lines and lines whose first non-blank character is a hash (``#'')
178 character are ignored.
181 A configuration file might appear as follows:
183 # Log all kernel messages, authentication messages of
184 # level notice or higher and anything of level err or
185 # higher to the console.
186 # Don't log private authentication messages!
187 *.err;kern.*;auth.notice;authpriv.none /dev/console
189 # Log anything (except mail) of level info or higher.
190 # Don't log private authentication messages!
191 *.info;mail.none;authpriv.none /var/log/messages
193 # The authpriv file has restricted access.
194 authpriv.* /var/log/secure
196 # Log all the mail messages in one place.
197 mail.* /var/log/maillog
199 # Everybody gets emergency messages, plus log them on another
202 *.emerg @arpa.berkeley.edu
204 # Root and Eric get alert and higher messages.
207 # Save mail and news errors of level err and higher in a
209 uucp,news.crit /var/log/spoolerr
212 .Bl -tag -width /etc/syslog.conf -compact
213 .It Pa /etc/syslog.conf
219 The effects of multiple selectors are sometimes not intuitive.
220 For example ``mail.crit,*.err'' will select ``mail'' facility messages at
221 the level of ``err'' or higher, not at the level of ``crit'' or higher.