]> git.saurik.com Git - apple/syslog.git/blame - syslogd.tproj/syslog.conf.5
syslog-322.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
a83ff38a 91Apple System Log (ASL) messages, sent using the
c4fdb7d1
A
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
a83ff38a
A
101If
102.Em facility
103is terminated by an asterisk (``*''),
104then facility names are matched using the prefix characters preceeding the asterisk.
105For example,
106.Pp
107.Dq 'com.apple.abc.*'
108.Pp
109matches any facility with the prefix ``com.apple.abc.''.
110These wildcard facility names typically must be enclosed in single or double quotes characters.
111.Pp
b16a592a
A
112The
113.Em level
114describes the severity of the message, and is a keyword from the
115following ordered list (higher to lower): emerg, alert, crit, err,
116warning, notice, info and debug.
117These keywords correspond to the
118similar
119.Pq Dv LOG_
120values specified to the
121.Xr syslog
122library routine.
123.Pp
124See
125.Xr syslog 3
126for a further descriptions of both the
127.Em facility
128and
129.Em level
130keywords and their significance.
131.Pp
132If a received message matches the specified
133.Em facility
134and is of the specified
135.Em level
136.Em (or a higher level) ,
137the action specified in the
138.Em action
139field will be taken.
140.Pp
141Multiple
142.Em selectors
143may be specified for a single
144.Em action
145by separating them with semicolon (``;'') characters.
146It is important to note, however, that each
147.Em selector
148can modify the ones preceding it.
149.Pp
150Multiple
151.Em facilities
152may be specified for a single
153.Em level
154by separating them with comma (``,'') characters.
155.Pp
156An asterisk (``*'') can be used to specify all
157.Em facilities
158or all
159.Em levels .
160.Pp
161The special
162.Em facility
163``mark'' receives a message at priority ``info'' every 20 minutes
164(see
165.Xr syslogd 8 ) .
166This is not enabled by a
167.Em facility
168field containing an asterisk.
169.Pp
170The special
171.Em level
172``none'' disables a particular
173.Em facility .
174.Pp
175The
176.Em action
177field of each line specifies the action to be taken when the
178.Em selector
179field selects a message.
180There are four forms:
181.Bl -bullet
182.It
183A pathname (beginning with a leading slash).
184Selected messages are appended to the file.
185.It
186A hostname (preceded by an at (``@'') sign).
187Selected messages are forwarded to the
188.Xr syslogd
189program on the named host.
190.It
191A comma separated list of users.
192Selected messages are written to those users
193if they are logged in.
194.It
195An asterisk.
196Selected messages are written to all logged-in users.
197.El
198.Pp
199Blank lines and lines whose first non-blank character is a hash (``#'')
200character are ignored.
201.Sh EXAMPLES
202.Pp
203A configuration file might appear as follows:
204.Bd -literal
205# Log all kernel messages, authentication messages of
206# level notice or higher and anything of level err or
207# higher to the console.
208# Don't log private authentication messages!
209*.err;kern.*;auth.notice;authpriv.none /dev/console
210
211# Log anything (except mail) of level info or higher.
212# Don't log private authentication messages!
213*.info;mail.none;authpriv.none /var/log/messages
214
215# The authpriv file has restricted access.
216authpriv.* /var/log/secure
217
218# Log all the mail messages in one place.
219mail.* /var/log/maillog
220
221# Everybody gets emergency messages, plus log them on another
222# machine.
223*.emerg *
224*.emerg @arpa.berkeley.edu
225
226# Root and Eric get alert and higher messages.
227*.alert root,eric
228
229# Save mail and news errors of level err and higher in a
230# special file.
231uucp,news.crit /var/log/spoolerr
232.Ed
233.Sh FILES
234.Bl -tag -width /etc/syslog.conf -compact
235.It Pa /etc/syslog.conf
236The
237.Xr syslogd 8
238configuration file.
239.El
240.Sh BUGS
241The effects of multiple selectors are sometimes not intuitive.
242For example ``mail.crit,*.err'' will select ``mail'' facility messages at
243the level of ``err'' or higher, not at the level of ``crit'' or higher.
244.Sh SEE ALSO
c4fdb7d1 245.Xr asl 3 ,
b16a592a
A
246.Xr syslog 3 ,
247.Xr syslogd 8
248.Sh HISTORY
249The
250.Nm
251file appeared in
252.Bx 4.3 ,
253along with
254.Xr syslogd 8 .