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