source: trunk/minix/man/man5/syslog.conf.5@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 7.3 KB
Line 
1.\" syslog.conf - syslogd(8) configuration file
2.\" Copyright (c) 1995 Martin Schulze <Martin.Schulze@Linux.DE>
3.\" Modified for Minix porting by G. Falzoni <gfalzoni@inwind.it>
4.\" $Id: syslog.conf.5,v 1.1 2006/04/03 14:59:52 beng Exp $
5.\"
6.\" This file is part of the sysklogd package, a kernel and system log daemon.
7.\"
8.\" This program is free software; you can redistribute it and/or modify
9.\" it under the terms of the GNU General Public License as published by
10.\" the Free Software Foundation; either version 2 of the License, or
11.\" (at your option) any later version.
12.\"
13.\" This program is distributed in the hope that it will be useful,
14.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16.\" GNU General Public License for more details.
17.\"
18.\" You should have received a copy of the GNU General Public License
19.\" along with this program; if not, write to the Free Software
20.\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
21.\"
22.\" Local macros
23.de Xr
24.BR \\$1 (\\$2)\\$3
25..
26.de LB
27.TP \\$1
28\\fB\\$2\\fR
29\\$3
30..
31.de LI
32.TP \\$1
33\\fI\\$2\\fR
34\\$3
35..
36.de LR
37.TP \\$1
38\\fR\\$2\\fR
39\\$3
40..
41.\" end local macros
42.TH SYSLOG.CONF 5 "1 January 1998"
43.SH NAME
44syslog.conf \- syslogd(8) configuration file
45.SH DESCRIPTION
46The
47.I syslog.conf
48file is the main configuration file for the
49.Xr syslogd 8
50which logs system messages on *nix systems. This file specifies rules
51for logging. For special features see the
52.Xr syslogd 8
53manpage.
54Every rule consists of two fields, a
55.I selector
56field and an
57.I action
58field. These two fields are separated by one or more tabs.
59The selector field specifies a pattern of facilities and
60priorities belonging to the specified action.
61Lines starting with a hash mark (``#'') and empty lines are ignored.
62.SH SELECTORS
63The selector field itself again consists of two parts, a
64.I facility
65and a
66.IR priority ,
67separated by a period (``.'').
68Both parts are case insensitive and can also be specified as decimal
69numbers, but don't do that, you have been warned. Both facilities and
70priorities are described in
71.BR syslog (3).
72The names mentioned below correspond to the similar
73.BR LOG_ -values
74in
75.IR /usr/include/syslog.h .
76The
77.I facility
78is one of the following keywords:
79.BR auth ", " authpriv ", " cron ", " daemon ", " kern ", " lpr ", "
80.BR mail ", " mark ", " news ", " security " (same as " auth "), "
81.BR syslog ", " user ", " uucp " and " local0 " through " local7 .
82The keyword
83.B security
84should not be used anymore and
85.B mark
86is only for internal use and therefore should not be used in
87applications. Anyway, you may want to specify and redirect these
88messages here. The
89.I facility
90specifies the subsystem that produced the message, i.e. all mail
91programs log with the mail facility
92.BR "" ( LOG_MAIL )
93if they log using syslog.
94
95The
96.I priority
97is one of the following keywords, in ascending order:
98.BR debug ", " info ", " notice ", " warning ", " warn " (same as "
99.BR warning "), " err ", " error " (same as " err "), " crit ", "
100.BR alert ", " emerg ", " panic " (same as " emerg ).
101The keywords
102.BR error ", " warn " and " panic
103are deprecated and should not be used anymore. The
104.I priority
105defines the severity of the message
106.PP
107The behavior of the original BSD syslogd is that all messages of the
108specified priority and higher are logged according to the given
109action. This
110.BR syslogd (8)
111behaves the same, but has some extensions.
112.PP
113In addition to the above mentioned names the
114.BR syslogd (8)
115understands the following extensions:
116.LB 5 "*" "An asterisk (``*'') before the period stands for all facilities.
117.LB 5 "none" "The keyword none stands for no priority of the given facility.
118.PP
119Multiple selectors may be specified for a single
120.I action
121using the semicolon (``;'') separator. Remember that each selector in
122the
123.I selector
124field is capable to overwrite the preceding ones. Using this
125behavior you can exclude some priorities from the pattern.
126.SH ACTIONS
127The action field of a rule describes the abstract term
128``logfile''. A ``logfile'' need not to be a real file, btw. The
129.Xr syslogd 8
130provides the following actions.
131.SS Regular File
132Typically messages are logged to real files. The file has to be
133specified with full pathname, beginning with a slash ``/''.
134.SS Terminal and Console
135If the file you specified is a tty, special tty-handling is done, same
136with
137.IR /dev/console .
138.SS Remote Machine
139This release does not implement
140remote logging, i.e. the ability to send messages to a remote host running
141.Xr syslogd 8 .
142To forward messages to another host, prepend the hostname
143with the at sign (``@'').
144.SS List of Users
145Usually critical messages are also directed to ``root'' on that
146machine. You can specify a list of users that shall get the message by
147simply writing the login. You may specify more than one user by
148separating them with commas (``,''). If they're logged in they
149get the message. Don't think a mail would be sent, that might be too
150late.
151.SS Everyone logged on
152Emergency messages often go to all users currently online to notify
153them that something strange is happening with the system. To specify
154this
155.IR wall (1)-feature
156use an asterisk (``*'').
157.SH EXAMPLES
158Here are some example, partially taken from a real existing site and
159configuration. Hopefully they rub out all questions to the
160configuration, if not, drop me (Joey) a line.
161.IP
162.nf
163# Store critical stuff in critical
164#
165*.crit /var/adm/critical
166.fi
167.LP
168This will store all messages with the priority
169.B crit
170in the file
171.IR /var/adm/critical .
172.IP
173.nf
174# The tcp wrapper loggs with mail.info, we display
175# all the connections on tty12
176#
177mail.info /dev/tty12
178.fi
179.LP
180This directs all messages that uses
181.BR mail.info " (in source " LOG_MAIL " | " LOG_INFO )
182to
183.IR /dev/tty12 ,
184the 12th console.
185.IP
186.nf
187# Log all mail.info and news.info messages to info
188#
189mail,news.info /var/adm/info
190.fi
191.LP
192This will extract all messages that come either with
193.BR mail.info " or with " news.info
194and store them in the file
195.IR /var/adm/info .
196.IP
197.nf
198# Emergency messages will be displayed using wall
199#
200*.emerg *
201.fi
202.LP
203This rule tells the
204.B syslogd
205to write all emergency messages to all currently logged in users. This
206is the wall action.
207.IP
208.nf
209# Messages of the priority alert will be directed
210# to the operator
211#
212*.alert root,joey
213.fi
214.LP
215This rule directs all messages with a priority of
216.B alert
217or higher to the terminals of the operator, i.e. of the users ``root''
218and ``joey'' if they're logged in.
219.IP
220.nf
221*.* @finlandia
222.fi
223.LP
224This rule would redirect all messages to a remote host called
225finlandia. This is useful especially in a cluster of machines where
226all syslog messages will be stored on only one machine.
227.SH FILES
228.I /etc/syslog.conf
229Configuration file for
230.B syslogd
231.SH BUGS
232The effects of multiple selectors are sometimes not intuitive. For
233example ``mail.crit,*.err'' will select ``mail'' facility messages at
234the level of ``err'' or higher, not at the level of ``crit'' or
235higher.
236
237.SH SEE ALSO
238.BR syslogd (8),
239.BR logger (1),
240.BR syslog (3)
241.SH AUTHORS
242The
243.B syslogd
244is taken from BSD sources, Greg Wettstein (greg@wind.rmcc.com)
245performed the port to Linux, Martin Schulze (joey@linux.de)
246made some bugfixes and added some new features.
Note: See TracBrowser for help on using the repository browser.