]>
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 | |
c4fdb7d1 A |
91 | Apple System Log messages, sent using the |
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 | |
b16a592a A |
101 | The |
102 | .Em level | |
103 | describes the severity of the message, and is a keyword from the | |
104 | following ordered list (higher to lower): emerg, alert, crit, err, | |
105 | warning, notice, info and debug. | |
106 | These keywords correspond to the | |
107 | similar | |
108 | .Pq Dv LOG_ | |
109 | values specified to the | |
110 | .Xr syslog | |
111 | library routine. | |
112 | .Pp | |
113 | See | |
114 | .Xr syslog 3 | |
115 | for a further descriptions of both the | |
116 | .Em facility | |
117 | and | |
118 | .Em level | |
119 | keywords and their significance. | |
120 | .Pp | |
121 | If a received message matches the specified | |
122 | .Em facility | |
123 | and is of the specified | |
124 | .Em level | |
125 | .Em (or a higher level) , | |
126 | the action specified in the | |
127 | .Em action | |
128 | field will be taken. | |
129 | .Pp | |
130 | Multiple | |
131 | .Em selectors | |
132 | may be specified for a single | |
133 | .Em action | |
134 | by separating them with semicolon (``;'') characters. | |
135 | It is important to note, however, that each | |
136 | .Em selector | |
137 | can modify the ones preceding it. | |
138 | .Pp | |
139 | Multiple | |
140 | .Em facilities | |
141 | may be specified for a single | |
142 | .Em level | |
143 | by separating them with comma (``,'') characters. | |
144 | .Pp | |
145 | An asterisk (``*'') can be used to specify all | |
146 | .Em facilities | |
147 | or all | |
148 | .Em levels . | |
149 | .Pp | |
150 | The special | |
151 | .Em facility | |
152 | ``mark'' receives a message at priority ``info'' every 20 minutes | |
153 | (see | |
154 | .Xr syslogd 8 ) . | |
155 | This is not enabled by a | |
156 | .Em facility | |
157 | field containing an asterisk. | |
158 | .Pp | |
159 | The special | |
160 | .Em level | |
161 | ``none'' disables a particular | |
162 | .Em facility . | |
163 | .Pp | |
164 | The | |
165 | .Em action | |
166 | field of each line specifies the action to be taken when the | |
167 | .Em selector | |
168 | field selects a message. | |
169 | There are four forms: | |
170 | .Bl -bullet | |
171 | .It | |
172 | A pathname (beginning with a leading slash). | |
173 | Selected messages are appended to the file. | |
174 | .It | |
175 | A hostname (preceded by an at (``@'') sign). | |
176 | Selected messages are forwarded to the | |
177 | .Xr syslogd | |
178 | program on the named host. | |
179 | .It | |
180 | A comma separated list of users. | |
181 | Selected messages are written to those users | |
182 | if they are logged in. | |
183 | .It | |
184 | An asterisk. | |
185 | Selected messages are written to all logged-in users. | |
186 | .El | |
187 | .Pp | |
188 | Blank lines and lines whose first non-blank character is a hash (``#'') | |
189 | character are ignored. | |
190 | .Sh EXAMPLES | |
191 | .Pp | |
192 | A 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. | |
205 | authpriv.* /var/log/secure | |
206 | ||
207 | # Log all the mail messages in one place. | |
208 | mail.* /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. | |
220 | uucp,news.crit /var/log/spoolerr | |
221 | .Ed | |
222 | .Sh FILES | |
223 | .Bl -tag -width /etc/syslog.conf -compact | |
224 | .It Pa /etc/syslog.conf | |
225 | The | |
226 | .Xr syslogd 8 | |
227 | configuration file. | |
228 | .El | |
229 | .Sh BUGS | |
230 | The effects of multiple selectors are sometimes not intuitive. | |
231 | For example ``mail.crit,*.err'' will select ``mail'' facility messages at | |
232 | the 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 | |
238 | The | |
239 | .Nm | |
240 | file appeared in | |
241 | .Bx 4.3 , | |
242 | along with | |
243 | .Xr syslogd 8 . |