Commit | Line | Data |
---|---|---|
ba466e0a KB |
1 | .\" Copyright (c) 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" %sccs.include.redist.man% | |
5 | .\" | |
4558968a | 6 | .\" @(#)syslog.conf.5 5.2 (Berkeley) %G% |
ba466e0a KB |
7 | .\" |
8 | .TH SYSLOG.CONF 5 "" | |
9 | .UC 7 | |
10 | .SH NAME | |
11 | syslog.conf \- syslogd configuration file | |
12 | .SH DESCRIPTION | |
13 | .I Syslog.conf | |
14 | is the configuration file for the | |
15 | .IR syslogd (8) | |
16 | program. | |
17 | It consists of lines with two fields: the | |
18 | .I selector | |
19 | field which specifies the types of messages and priorities to which the | |
20 | line applies, and an | |
21 | .I action | |
22 | field which specifies the action to be taken if a message | |
23 | .IR syslogd | |
24 | receives matches the selection criteria. | |
25 | The | |
26 | .I selector | |
27 | field is separated from the | |
28 | .I action | |
29 | field by one or more tab characters. | |
30 | .PP | |
31 | .I Selectors | |
32 | are encoded as a | |
33 | .IR facility , | |
34 | a period (``.''), and a | |
35 | .IR level , | |
36 | with no intervening white-space. | |
37 | Both the | |
38 | .I facility | |
39 | and the | |
40 | .I level | |
41 | are case insensitive. | |
42 | .PP | |
43 | The | |
44 | .I facility | |
45 | describes the part of the system generating the message, and is one of | |
46 | the following keywords: auth, authpriv, cron, daemon, kern, lpr, mail, | |
47 | mark, news, syslog, user, uucp and local0 through local7. | |
48 | These keywords (with the exception of mark) correspond to the | |
49 | similar ``LOG_'' values specified to the | |
50 | .I openlog | |
51 | and | |
52 | .I syslog | |
53 | library routines. | |
54 | .PP | |
55 | The | |
56 | .I level | |
57 | describes the severity of the message, and is a keyword from the | |
58 | following ordered list (higher to lower): emerg, alert, crit, err, | |
59 | warning, notice and debug. | |
60 | These keywords correspond to the | |
61 | similar ``LOG_'' values specified to the | |
62 | .I syslog | |
63 | library routine. | |
64 | .PP | |
65 | See | |
66 | .IR syslog (3) | |
67 | for a further descriptions of both the | |
68 | .I facility | |
69 | and | |
70 | .I level | |
71 | keywords and their significance. | |
72 | .PP | |
73 | If a received message matches the specified | |
74 | .I facility | |
75 | and is of the specified | |
76 | .I level | |
77 | .BR "(or a higher level)" , | |
78 | the action specified in the | |
79 | .I action | |
80 | field will be taken. | |
81 | .PP | |
82 | Multiple | |
83 | .I selectors | |
84 | may be specified for a single | |
85 | .I action | |
86 | by separating them with semicolon (``;'') characters. | |
4558968a KB |
87 | It is important to note, however, that each |
88 | .I selector | |
89 | can modify the ones preceding it. | |
ba466e0a KB |
90 | .PP |
91 | Multiple | |
92 | .I facilities | |
93 | may be specified for a single | |
94 | .I level | |
95 | by separating them with comma (``,'') characters. | |
96 | .PP | |
97 | An asterisk (``*'') can be used to specify all | |
98 | .I facilities | |
99 | or all | |
100 | .IR levels . | |
101 | .PP | |
102 | The special | |
103 | .I facility | |
104 | ``mark'' receives a message at priority ``info'' every 20 minutes | |
105 | (see | |
106 | .IR syslogd (8)). | |
107 | This is not enabled by a | |
108 | .I facility | |
109 | field containing an asterisk. | |
110 | .PP | |
111 | The special | |
112 | .I level | |
113 | ``none'' disables a particular | |
114 | .IR facility . | |
115 | .PP | |
116 | The | |
117 | .I action | |
118 | field of each line specifies the action to be taken when the | |
119 | .I selector | |
120 | field selects a message. | |
121 | There are four forms: | |
122 | .IP \(bu 3n | |
123 | A pathname (beginning with a leading slash). | |
124 | Selected messages are appended to the file. | |
125 | .IP \(bu 3n | |
126 | A hostname (preceded by an at (``@'') sign). | |
127 | Selected messages are forwarded to the | |
128 | .I syslogd | |
129 | program on the named host. | |
130 | .IP \(bu 3n | |
131 | A comma separated list of users. | |
132 | Selected messages are written to those users | |
133 | if they are logged in. | |
134 | .IP \(bu 3n | |
135 | An asterisk. | |
136 | Selected messages are written to all logged-in users. | |
137 | .PP | |
138 | Blank lines and lines whose first non-blank character is a hash (``#'') | |
139 | character are ignored. | |
140 | .SH EXAMPLES | |
141 | .PP | |
142 | A configuration file might appear as follows: | |
143 | .sp | |
144 | .nf | |
145 | # Log all kernel messages, authentication messages of | |
146 | # level notice or higher and anything of level err or | |
147 | # higher to the console. | |
148 | # Don't log private authentication messages! | |
149 | *.err;kern.*;auth.notice;authpriv.none /dev/console | |
150 | ||
151 | # Log anything (except mail) of level info or higher. | |
152 | # Don't log private authentication messages! | |
153 | *.info;mail.none;authpriv.none /var/log/messages | |
154 | ||
155 | # The authpriv file has restricted access. | |
156 | authpriv.* /var/log/secure | |
157 | ||
158 | # Log all the mail messages in one place. | |
159 | mail.* /var/log/maillog | |
160 | ||
161 | # Everybody gets emergency messages, plus log them on another | |
162 | # machine. | |
163 | *.emerg * | |
164 | *.emerg @arpa.berkeley.edu | |
165 | ||
166 | # Root and Eric get alert and higher messages. | |
167 | *.alert root,eric | |
168 | ||
169 | # Save mail and news errors of level err and higher in a | |
170 | # special file. | |
171 | uucp,news.crit /var/log/spoolerr | |
172 | .fi | |
173 | .SH FILES | |
174 | /etc/syslog.conf \fIsyslogd\fP(8) configuration file | |
4558968a KB |
175 | .SH BUGS |
176 | The effects of multiple selectors are sometimes not intuitive. | |
177 | For example ``mail.crit,*.err'' will select ``mail'' facility messages at | |
178 | the level of ``err'' or higher, not at the level of ``crit'' or higher. | |
ba466e0a KB |
179 | .SH "SEE ALSO" |
180 | syslog(3), syslogd(8) |