]> git.saurik.com Git - apple/syslog.git/blame - syslogd.tproj/syslog.conf.5
syslog-97.1.tar.gz
[apple/syslog.git] / syslogd.tproj / syslog.conf.5
CommitLineData
b16a592a
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.\"
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 $
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
c4fdb7d1
A
79describes the part of the system generating the message.
80Legacy facility names are: auth, authpriv, cron, daemon, kern, lpr, mail,
b16a592a
A
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
c4fdb7d1
A
91Apple System Log messages, sent using the
92.Xr asl 3
93library routines permit the facility name to be an arbitrary string,
94although users of the system are encouraged to use a
95.Dq reverse ICANN
96naming convention, for example
97.Dq com.apple.system.syslog .
98Since these facility names may contain dot characters, the names may be enclosed in
99either singe quote or double quote characters.
100.Pp
b16a592a
A
101The
102.Em level
103describes the severity of the message, and is a keyword from the
104following ordered list (higher to lower): emerg, alert, crit, err,
105warning, notice, info and debug.
106These keywords correspond to the
107similar
108.Pq Dv LOG_
109values specified to the
110.Xr syslog
111library routine.
112.Pp
113See
114.Xr syslog 3
115for a further descriptions of both the
116.Em facility
117and
118.Em level
119keywords and their significance.
120.Pp
121If a received message matches the specified
122.Em facility
123and is of the specified
124.Em level
125.Em (or a higher level) ,
126the action specified in the
127.Em action
128field will be taken.
129.Pp
130Multiple
131.Em selectors
132may be specified for a single
133.Em action
134by separating them with semicolon (``;'') characters.
135It is important to note, however, that each
136.Em selector
137can modify the ones preceding it.
138.Pp
139Multiple
140.Em facilities
141may be specified for a single
142.Em level
143by separating them with comma (``,'') characters.
144.Pp
145An asterisk (``*'') can be used to specify all
146.Em facilities
147or all
148.Em levels .
149.Pp
150The special
151.Em facility
152``mark'' receives a message at priority ``info'' every 20 minutes
153(see
154.Xr syslogd 8 ) .
155This is not enabled by a
156.Em facility
157field containing an asterisk.
158.Pp
159The special
160.Em level
161``none'' disables a particular
162.Em facility .
163.Pp
164The
165.Em action
166field of each line specifies the action to be taken when the
167.Em selector
168field selects a message.
169There are four forms:
170.Bl -bullet
171.It
172A pathname (beginning with a leading slash).
173Selected messages are appended to the file.
174.It
175A hostname (preceded by an at (``@'') sign).
176Selected messages are forwarded to the
177.Xr syslogd
178program on the named host.
179.It
180A comma separated list of users.
181Selected messages are written to those users
182if they are logged in.
183.It
184An asterisk.
185Selected messages are written to all logged-in users.
186.El
187.Pp
188Blank lines and lines whose first non-blank character is a hash (``#'')
189character are ignored.
190.Sh EXAMPLES
191.Pp
192A configuration file might appear as follows:
193.Bd -literal
194# Log all kernel messages, authentication messages of
195# level notice or higher and anything of level err or
196# higher to the console.
197# Don't log private authentication messages!
198*.err;kern.*;auth.notice;authpriv.none /dev/console
199
200# Log anything (except mail) of level info or higher.
201# Don't log private authentication messages!
202*.info;mail.none;authpriv.none /var/log/messages
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
c4fdb7d1 234.Xr asl 3 ,
b16a592a
A
235.Xr syslog 3 ,
236.Xr syslogd 8
237.Sh HISTORY
238The
239.Nm
240file appeared in
241.Bx 4.3 ,
242along with
243.Xr syslogd 8 .