]>
Commit | Line | Data |
---|---|---|
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 | |
42 | configuration file | |
43 | .Sh DESCRIPTION | |
44 | The | |
45 | .Nm syslog.conf | |
46 | file is the configuration file for the | |
47 | .Xr syslogd 8 | |
48 | program. | |
49 | It consists of lines with two fields: the | |
50 | .Em selector | |
51 | field which specifies the types of messages and priorities to which the | |
52 | line applies, and an | |
53 | .Em action | |
54 | field which specifies the action to be taken if a message | |
55 | .Xr syslogd | |
56 | receives matches the selection criteria. | |
57 | The | |
58 | .Em selector | |
59 | field is separated from the | |
60 | .Em action | |
61 | field by one or more tab characters. | |
62 | .Pp | |
63 | The | |
64 | .Em Selectors | |
65 | function | |
66 | are encoded as a | |
67 | .Em facility , | |
68 | a period (``.''), and a | |
69 | .Em level , | |
70 | with no intervening white-space. | |
71 | Both the | |
72 | .Em facility | |
73 | and the | |
74 | .Em level | |
75 | are case insensitive. | |
76 | .Pp | |
77 | The | |
78 | .Em facility | |
c4fdb7d1 A |
79 | describes the part of the system generating the message. |
80 | Legacy facility names are: auth, authpriv, cron, daemon, kern, lpr, mail, | |
b16a592a A |
81 | mark, news, syslog, user, uucp and local0 through local7. |
82 | These keywords (with the exception of mark) correspond to the | |
83 | similar | |
84 | .Dq Dv LOG_ | |
85 | values specified to the | |
86 | .Xr openlog 3 | |
87 | and | |
88 | .Xr syslog 3 | |
89 | library routines. | |
90 | .Pp | |
a83ff38a | 91 | Apple System Log (ASL) messages, sent using the |
c4fdb7d1 A |
92 | .Xr asl 3 |
93 | library routines permit the facility name to be an arbitrary string, | |
94 | although users of the system are encouraged to use a | |
95 | .Dq reverse ICANN | |
96 | naming convention, for example | |
97 | .Dq com.apple.system.syslog . | |
98 | Since these facility names may contain dot characters, the names may be enclosed in | |
99 | either singe quote or double quote characters. | |
100 | .Pp | |
a83ff38a A |
101 | If |
102 | .Em facility | |
103 | is terminated by an asterisk (``*''), | |
104 | then facility names are matched using the prefix characters preceeding the asterisk. | |
105 | For example, | |
106 | .Pp | |
107 | .Dq 'com.apple.abc.*' | |
108 | .Pp | |
109 | matches any facility with the prefix ``com.apple.abc.''. | |
110 | These wildcard facility names typically must be enclosed in single or double quotes characters. | |
111 | .Pp | |
b16a592a A |
112 | The |
113 | .Em level | |
114 | describes the severity of the message, and is a keyword from the | |
115 | following ordered list (higher to lower): emerg, alert, crit, err, | |
116 | warning, notice, info and debug. | |
117 | These keywords correspond to the | |
118 | similar | |
119 | .Pq Dv LOG_ | |
120 | values specified to the | |
121 | .Xr syslog | |
122 | library routine. | |
123 | .Pp | |
124 | See | |
125 | .Xr syslog 3 | |
126 | for a further descriptions of both the | |
127 | .Em facility | |
128 | and | |
129 | .Em level | |
130 | keywords and their significance. | |
131 | .Pp | |
132 | If a received message matches the specified | |
133 | .Em facility | |
134 | and is of the specified | |
135 | .Em level | |
136 | .Em (or a higher level) , | |
137 | the action specified in the | |
138 | .Em action | |
139 | field will be taken. | |
140 | .Pp | |
141 | Multiple | |
142 | .Em selectors | |
143 | may be specified for a single | |
144 | .Em action | |
145 | by separating them with semicolon (``;'') characters. | |
146 | It is important to note, however, that each | |
147 | .Em selector | |
148 | can modify the ones preceding it. | |
149 | .Pp | |
150 | Multiple | |
151 | .Em facilities | |
152 | may be specified for a single | |
153 | .Em level | |
154 | by separating them with comma (``,'') characters. | |
155 | .Pp | |
156 | An asterisk (``*'') can be used to specify all | |
157 | .Em facilities | |
158 | or all | |
159 | .Em levels . | |
160 | .Pp | |
161 | The special | |
162 | .Em facility | |
163 | ``mark'' receives a message at priority ``info'' every 20 minutes | |
164 | (see | |
165 | .Xr syslogd 8 ) . | |
166 | This is not enabled by a | |
167 | .Em facility | |
168 | field containing an asterisk. | |
169 | .Pp | |
170 | The special | |
171 | .Em level | |
172 | ``none'' disables a particular | |
173 | .Em facility . | |
174 | .Pp | |
175 | The | |
176 | .Em action | |
177 | field of each line specifies the action to be taken when the | |
178 | .Em selector | |
179 | field selects a message. | |
180 | There are four forms: | |
181 | .Bl -bullet | |
182 | .It | |
183 | A pathname (beginning with a leading slash). | |
184 | Selected messages are appended to the file. | |
185 | .It | |
186 | A hostname (preceded by an at (``@'') sign). | |
187 | Selected messages are forwarded to the | |
188 | .Xr syslogd | |
189 | program on the named host. | |
190 | .It | |
191 | A comma separated list of users. | |
192 | Selected messages are written to those users | |
193 | if they are logged in. | |
194 | .It | |
195 | An asterisk. | |
196 | Selected messages are written to all logged-in users. | |
197 | .El | |
198 | .Pp | |
199 | Blank lines and lines whose first non-blank character is a hash (``#'') | |
200 | character are ignored. | |
201 | .Sh EXAMPLES | |
202 | .Pp | |
203 | A 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. | |
216 | authpriv.* /var/log/secure | |
217 | ||
218 | # Log all the mail messages in one place. | |
219 | mail.* /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. | |
231 | uucp,news.crit /var/log/spoolerr | |
232 | .Ed | |
233 | .Sh FILES | |
234 | .Bl -tag -width /etc/syslog.conf -compact | |
235 | .It Pa /etc/syslog.conf | |
236 | The | |
237 | .Xr syslogd 8 | |
238 | configuration file. | |
239 | .El | |
240 | .Sh BUGS | |
241 | The effects of multiple selectors are sometimes not intuitive. | |
242 | For example ``mail.crit,*.err'' will select ``mail'' facility messages at | |
243 | the 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 | |
249 | The | |
250 | .Nm | |
251 | file appeared in | |
252 | .Bx 4.3 , | |
253 | along with | |
254 | .Xr syslogd 8 . |