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 .\" from: @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93
33 .\" $NetBSD: syslog.conf.5,v 1.4 1996/01/02 17:41:46 perry Exp $
46 file is the configuration file for the
49 It consists of lines with two fields: the
51 field which specifies the types of messages and priorities to which the
54 field which specifies the action to be taken if a message
56 receives matches the selection criteria.
59 field is separated from the
61 field by one or more tab characters.
68 a period (``.''), and a
70 with no intervening white-space.
79 describes the part of the system generating the message, and is one of
80 the following keywords: auth, authpriv, cron, daemon, kern, lpr, mail,
81 mark, news, syslog, user, uucp and local0 through local7.
82 These keywords (with the exception of mark) correspond to the
85 values specified to the
93 describes the severity of the message, and is a keyword from the
94 following ordered list (higher to lower): emerg, alert, crit, err,
95 warning, notice, info and debug.
96 These keywords correspond to the
99 values specified to the
105 for a further descriptions of both the
109 keywords and their significance.
111 If a received message matches the specified
113 and is of the specified
115 .Em (or a higher level) ,
116 the action specified in the
122 may be specified for a single
124 by separating them with semicolon (``;'') characters.
125 It is important to note, however, that each
127 can modify the ones preceding it.
131 may be specified for a single
133 by separating them with comma (``,'') characters.
135 An asterisk (``*'') can be used to specify all
142 ``mark'' receives a message at priority ``info'' every 20 minutes
145 This is not enabled by a
147 field containing an asterisk.
151 ``none'' disables a particular
156 field of each line specifies the action to be taken when the
158 field selects a message.
159 There are four forms:
162 A pathname (beginning with a leading slash).
163 Selected messages are appended to the file.
165 A hostname (preceded by an at (``@'') sign).
166 Selected messages are forwarded to the
168 program on the named host.
170 A comma separated list of users.
171 Selected messages are written to those users
172 if they are logged in.
175 Selected messages are written to all logged-in users.
178 Blank lines and lines whose first non-blank character is a hash (``#'')
179 character are ignored.
182 A configuration file might appear as follows:
184 # Log all kernel messages, authentication messages of
185 # level notice or higher and anything of level err or
186 # higher to the console.
187 # Don't log private authentication messages!
188 *.err;kern.*;auth.notice;authpriv.none /dev/console
190 # Log anything (except mail) of level info or higher.
191 # Don't log private authentication messages!
192 *.info;mail.none;authpriv.none /var/log/messages
194 # The authpriv file has restricted access.
195 authpriv.* /var/log/secure
197 # Log all the mail messages in one place.
198 mail.* /var/log/maillog
200 # Everybody gets emergency messages, plus log them on another
203 *.emerg @arpa.berkeley.edu
205 # Root and Eric get alert and higher messages.
208 # Save mail and news errors of level err and higher in a
210 uucp,news.crit /var/log/spoolerr
213 .Bl -tag -width /etc/syslog.conf -compact
214 .It Pa /etc/syslog.conf
220 The effects of multiple selectors are sometimes not intuitive.
221 For example ``mail.crit,*.err'' will select ``mail'' facility messages at
222 the level of ``err'' or higher, not at the level of ``crit'' or higher.