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