summaryrefslogtreecommitdiff
path: root/usr/src/man/man4/syslog.conf.4
blob: 7dcc4f57319b96e1ac53299420589584a2edd35d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
'\" te
.\" Copyright (c) 2013 Gary Mills
.\" Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 1983 Regents of the University of California.  All rights reserved.  The Berkeley software License Agreement  specifies the terms and conditions for redistribution.
.TH SYSLOG.CONF 4 "Nov 19, 2013"
.SH NAME
syslog.conf \- configuration file for syslogd system log daemon
.SH SYNOPSIS
.LP
.nf
\fB/etc/syslog.conf\fR
.fi

.SH DESCRIPTION
.LP
The file \fB/etc/syslog.conf\fR contains information used by the system log
daemon, \fBsyslogd\fR(1M), to forward a system message to appropriate log files
and/or users. \fBsyslogd\fR preprocesses this file through \fBm4\fR(1) to
obtain the correct information for certain log files, defining \fBLOGHOST\fR if
the address of "loghost" is the same as one of the addresses of the host that
is running \fBsyslogd\fR.
.sp
.LP
A configuration entry is composed of two TAB-separated fields:
.sp
.in +2
.nf
\fIselector		action\fR
.fi
.in -2

.sp
.LP
The \fIselector\fR field contains a semicolon-separated list of priority
specifications of the form:
.sp
.in +2
.nf
\fIfacility\fR\fB\&.\fR\fIlevel\fR [ \fB;\fR \fIfacility\fR\fB\&.\fR\fIlevel\fR ]
.fi
.in -2

.sp
.LP
where \fIfacility\fR is a system facility, or comma-separated list of
facilities, and \fIlevel\fR is an indication of the severity of the condition
being logged.
The presence of a facility name only implies that it is available.
Each individual service determines which facility it will use for logging.
In particular, many facilities are only useful for \fBsyslog\fR messages
that are forwarded from other operating systems.
Recognized values for \fIfacility\fR include:
.sp
.ne 2
.na
\fB\fBkern\fR\fR
.ad
.RS 12n
Messages generated by the kernel.
.RE

.sp
.ne 2
.na
\fB\fBuser\fR\fR
.ad
.RS 12n
Messages generated by user processes. This is the default priority for messages
from programs or facilities not listed in this file.
.RE

.sp
.ne 2
.na
\fB\fBmail\fR\fR
.ad
.RS 12n
The mail system.
.RE

.sp
.ne 2
.na
\fB\fBdaemon\fR\fR
.ad
.RS 12n
Various system daemons.
.RE

.sp
.ne 2
.na
\fB\fBauth\fR\fR
.ad
.RS 12n
The authorization system: \fBlogin\fR(1), \fBsu\fR(1M), \fBgetty\fR(1M), among
others.
.RE

.sp
.ne 2
.na
\fB\fBlpr\fR\fR
.ad
.RS 12n
The line printer spooling system: \fBlpr\fR(1B), \fBlpc\fR(1B), among others.
.RE

.sp
.ne 2
.na
\fB\fBnews\fR\fR
.ad
.RS 12n
Designated for the USENET network news system.
.RE

.sp
.ne 2
.na
\fB\fBuucp\fR\fR
.ad
.RS 12n
Designated for the UUCP system; it does not currently use the \fBsyslog\fR
mechanism.
.RE

.sp
.ne 2
.na
\fB\fBaltcron\fR\fR
.ad
.RS 12n
Designated for the BSD cron/at system.
.RE

.sp
.ne 2
.na
\fB\fBauthpriv\fR\fR
.ad
.RS 12n
Designated for the BSD security/authorization system.
.RE

.sp
.ne 2
.na
\fB\fBftp\fR\fR
.ad
.RS 12n
Designated for the file transfer system.
.RE

.sp
.ne 2
.na
\fB\fBntp\fR\fR
.ad
.RS 12n
Designated for the network time system.
.RE

.sp
.ne 2
.na
\fB\fBaudit\fR\fR
.ad
.RS 12n
Designated for audit messages generated by systems that audit by means of
syslog.
.RE

.sp
.ne 2
.na
\fB\fBconsole\fR\fR
.ad
.RS 12n
Designated for the BSD console system.
.RE

.sp
.ne 2
.na
\fB\fBcron\fR\fR
.ad
.RS 12n
Designated for \fBcron\fR/\fBat\fR messages generated by systems that do
logging through \fBsyslog\fR.
The current versions of \fBcron\fR and \fBat\fR do not use this facility
for logging.
.RE

.sp
.ne 2
.na
\fB\fBlocal0-7\fR\fR
.ad
.RS 12n
Designated for local use.
.RE

.sp
.ne 2
.na
\fB\fBmark\fR\fR
.ad
.RS 12n
For timestamp messages produced internally by \fBsyslogd\fR.
.RE

.sp
.ne 2
.na
\fB\fB*\fR\fR
.ad
.RS 12n
An asterisk indicates all facilities except for the \fBmark\fR facility.
.RE

.sp
.LP
Recognized values for \fIlevel\fR are (in descending order of severity):
.sp
.ne 2
.na
\fB\fBemerg\fR\fR
.ad
.RS 11n
For panic conditions that would normally be broadcast to all users.
.RE

.sp
.ne 2
.na
\fB\fBalert\fR\fR
.ad
.RS 11n
For conditions that should be corrected immediately, such as a corrupted system
database.
.RE

.sp
.ne 2
.na
\fB\fBcrit\fR\fR
.ad
.RS 11n
For warnings about critical conditions, such as hard device errors.
.RE

.sp
.ne 2
.na
\fB\fBerr\fR\fR
.ad
.RS 11n
For other errors.
.RE

.sp
.ne 2
.na
\fB\fBwarning\fR\fR
.ad
.RS 11n
For warning messages.
.RE

.sp
.ne 2
.na
\fB\fBnotice\fR\fR
.ad
.RS 11n
For conditions that are not error conditions, but may require special handling.
A configuration entry with a \fIlevel\fR value of \fBnotice\fR must appear on a
separate line.
.RE

.sp
.ne 2
.na
\fB\fBinfo\fR\fR
.ad
.RS 11n
Informational messages.
.RE

.sp
.ne 2
.na
\fB\fBdebug\fR\fR
.ad
.RS 11n
For messages that are normally used only when debugging a program.
.RE

.sp
.ne 2
.na
\fB\fBnone\fR\fR
.ad
.RS 11n
Do not send messages from the indicated \fIfacility\fR to the selected file.
For example, a \fIselector\fR of
.sp
\fB*.debug;mail.none\fR
.sp
sends all messages \fIexcept\fR mail messages to the selected file.
.RE

.sp
.LP
For a given \fIfacility\fR and \fIlevel\fR, \fBsyslogd\fR matches all messages
for that level and all higher levels. For example, an entry that specifies a
level of \fBcrit\fR also logs messages at the \fBalert\fR and \fBemerg\fR
levels.
.sp
.LP
The \fIaction\fR field indicates where to forward the message. Values for this
field can have one of four forms:
.RS +4
.TP
.ie t \(bu
.el o
A filename, beginning with a leading slash, which indicates that messages
specified by the \fIselector\fR are to be written to the specified file. The
file is opened in append mode if it exists. If the file does not exist, logging
silently fails for this action.
.RE
.RS +4
.TP
.ie t \(bu
.el o
The name of a remote host, prefixed with an \fB@\fR, as with:
\fB@\fR\fIserver\fR, which indicates that messages specified by the
\fIselector\fR are to be forwarded to the \fBsyslogd\fR on the named host. The
hostname "loghost" is treated, in the default \fBsyslog.conf\fR, as the
hostname given to the machine that logs \fBsyslogd\fR messages. Every machine
is "loghost" by default, per the hosts database. It is also possible to specify
one machine on a network to be "loghost" by, literally, naming the machine
"loghost". If the local machine is designated to be "loghost", then
\fBsyslogd\fR messages are written to the appropriate files. Otherwise, they
are sent to the machine "loghost" on the network.
.RE
.RS +4
.TP
.ie t \(bu
.el o
A comma-separated list of usernames, which indicates that messages specified by
the \fIselector\fR are to be written to the named users if they are logged in.
.RE
.RS +4
.TP
.ie t \(bu
.el o
An asterisk, which indicates that messages specified by the \fIselector\fR are
to be written to all logged-in users.
.RE
.sp
.LP
Blank lines are ignored. Lines for which the first nonwhite character is
a '\fB#\fR' are treated as comments.
.SH EXAMPLES
.LP
\fBExample 1 \fRA Sample Configuration File
.sp
.LP
With the following configuration file:

.sp

.sp
.TS
l l
l l .
\fB*.notice\fR	\fB/var/log/notice\fR
\fBmail.info\fR	\fB/var/log/notice\fR
\fB*.crit\fR	\fB/var/log/critical\fR
\fBkern,mark.debug\fR	\fB/dev/console\fR
\fBkern.err\fR	\fB@server\fR
\fB*.emerg\fR	\fB*\fR
\fB*.alert\fR	\fBroot,operator\fR
\fB*.alert;auth.warning\fR	\fB/var/log/auth\fR
.TE

.sp
.LP
\fBsyslogd\fR(1M) logs all mail system messages except \fBdebug\fR messages and
all \fBnotice\fR (or higher) messages into a file named \fB/var/log/notice\fR.
It logs all critical messages into \fB/var/log/critical\fR, and all kernel
messages and 20-minute marks onto the system console.

.sp
.LP
Kernel messages of \fBerr\fR (error) severity or higher are forwarded to the
machine named \fBserver\fR. Emergency messages are forwarded to all users. The
users \fBroot\fR and \fBoperator\fR are informed of any \fBalert\fR messages.
All messages from the authorization system of \fBwarning\fR level or higher are
logged in the file \fB/var/log/auth\fR.

.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Stable
.TE

.SH SEE ALSO
.LP
\fBat\fR(1), \fBcrontab\fR(1), \fBlogger\fR(1), \fBlogin\fR(1), \fBlp\fR(1),
\fBlpc\fR(1B), \fBlpr\fR(1B), \fBm4\fR(1), \fBcron\fR(1M), \fBgetty\fR(1M),
\fBin.ftpd\fR(1M), \fBsu\fR(1M), \fBsyslogd\fR(1M), \fBsyslog\fR(3C),
\fBhosts\fR(4), \fBattributes\fR(5)