]> git.ipfire.org Git - thirdparty/util-linux.git/blame - syslogd/syslog.conf.5
Imported from util-linux-2.5 tarball.
[thirdparty/util-linux.git] / syslogd / syslog.conf.5
CommitLineData
6dbe3af9
KZ
1.\" Copyright (c) 1990, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
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.
19.\"
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
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)syslog.conf.5 5.3 (Berkeley) 5/10/91
33.\"
34.Dd May 10, 1991
35.Dt SYSLOG.CONF 5
36.Os
37.Sh NAME
38.Nm syslog.conf
39.Nd
40.Xr syslogd 8
41configuration file
42.Sh DESCRIPTION
43The
44.Nm syslog.conf
45file is the configuration file for the
46.Xr syslogd 8
47program.
48It consists of lines with two fields: the
49.Em selector
50field which specifies the types of messages and priorities to which the
51line applies, and an
52.Em action
53field which specifies the action to be taken if a message
54.Xr syslogd
726f69e2
KZ
55received matches the selection criteria. There may not be
56.Em any
57spaces in the action field.
6dbe3af9
KZ
58The
59.Em selector
60field is separated from the
61.Em action
726f69e2
KZ
62field by one or more tab or space characters (this is a departure from the
63standard BSD way of doing things: both tabs
64.Em and
65spaces may be used to separate the selector from the action).
6dbe3af9
KZ
66.Pp
67The
68.Em Selector
69functions
70are encoded as a
71.Em facility ,
72a period (``.''), and a
73.Em level ,
74with no intervening white-space.
75Both the
76.Em facility
77and the
78.Em level
79are case insensitive.
80.Pp
81The
82.Em facility
83describes the part of the system generating the message, and is one of
84the following keywords: auth, authpriv, cron, daemon, kern, lpr, mail,
85mark, news, syslog, user, uucp and local0 through local7.
86These keywords (with the exception of mark) correspond to the
87similar
88.Dq Dv LOG_
89values specified to the
90.Xr openlog 3
91and
92.Xr syslog 3
93library routines.
94.Pp
95The
96.Em level
97describes the severity of the message, and is a keyword, optionally
98preceded by an equals (``=''), from the following ordered list
99(higher to lower): emerg, alert, crit, err, warning, notice, info,
100and debug.
101These keywords correspond to the
102similar
103.Pq Dv LOG_
104values specified to the
105.Xr syslog
106library routine.
107.Pp
108See
109.Xr syslog 3
110for a further descriptions of both the
111.Em facility
112and
113.Em level
114keywords and their significance.
115.Pp
116If a received message matches the specified
117.Em facility
118and is of the specified
119.Em level
120.Em (or a higher level if
121.Em level
122was specified without ``='') ,
123the action specified in the
124.Em action
125field will be taken.
126.Pp
127Multiple
128.Em selectors
129may be specified for a single
130.Em action
131by separating them with semicolon (``;'') characters.
132It is important to note, however, that each
133.Em selector
134can modify the ones preceding it.
135.Pp
136Multiple
137.Em facilities
138may be specified for a single
139.Em level
140by separating them with comma (``,'') characters.
141.Pp
142An asterisk (``*'') can be used to specify all
143.Em facilities
144or all
145.Em levels .
146.Pp
147The special
148.Em facility
149``mark'' receives a message at priority ``info'' every 20 minutes
150(see
151.Xr syslogd 8 ) .
152This is not enabled by a
153.Em facility
154field containing an asterisk.
155.Pp
156The special
157.Em level
158``none'' disables a particular
159.Em facility .
160.Pp
161The
162.Em action
163field of each line specifies the action to be taken when the
164.Em selector
165field selects a message.
166There are four forms:
167.Bl -bullet
168.It
169A pathname (beginning with a leading slash).
170Selected messages are appended to the file.
171.It
172A hostname (preceded by an at (``@'') sign).
173Selected messages are forwarded to the
174.Xr syslogd
175program on the named host.
176.It
177A comma separated list of users.
178Selected messages are written to those users
179if they are logged in.
180.It
181An asterisk.
182Selected messages are written to all logged-in users.
183.El
184.Pp
185Blank lines and lines whose first non-blank character is a hash (``#'')
186character are ignored.
187.Sh EXAMPLES
188.Pp
189A configuration file might appear as follows:
190.Bd -literal
191# Log all kernel messages, authentication messages of
192# level notice or higher and anything of level err or
193# higher to the console.
194# Don't log private authentication messages!
195*.err;kern.*;auth.notice;authpriv.none /dev/console
196
197# Log anything (except mail) of level info or higher.
198# Don't log private authentication messages!
199*.info;mail.none;authpriv.none /var/log/messages
200
201# Log debug messages only
202*.=debug /var/log/debug
203
204# The authpriv file has restricted access.
205authpriv.* /var/log/secure
206
207# Log all the mail messages in one place.
208mail.* /var/log/maillog
209
210# Everybody gets emergency messages, plus log them on another
211# machine.
212*.emerg *
213*.emerg @arpa.berkeley.edu
214
215# Root and Eric get alert and higher messages.
216*.alert root,eric
217
218# Save mail and news errors of level err and higher in a
219# special file.
220uucp,news.crit /var/log/spoolerr
221.Ed
222.Sh FILES
223.Bl -tag -width /etc/syslog.conf -compact
224.It Pa /etc/syslog.conf
225The
226.Xr syslogd 8
227configuration file.
228.El
229.Sh BUGS
230The effects of multiple selectors are sometimes not intuitive.
231For example ``mail.crit,*.err'' will select ``mail'' facility messages at
232the level of ``err'' or higher, not at the level of ``crit'' or higher.
233.Sh SEE ALSO
234.Xr syslog 3 ,
235.Xr syslogd 8
236.Sh HISTORY
237The
238.Nm syslog.conf
239file format is
240.Ud .