1.\" Copyright (c) 1990, 1991 The Regents of the University of California. 2.\" 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.\" @(#)syslog.conf.5 5.3 (Berkeley) 5/10/91 33.\" 34.Dd May 10, 1991 35.Dt SYSLOG.CONF 5 36.Os 37.Sh NAME 38.Nm syslog.conf 39.Nd 40.Xr syslogd 8 41configuration file 42.Sh DESCRIPTION 43The 44.Nm syslog.conf 45file is the configuration file for the 46.Xr syslogd 8 47program. 48It consists of lines with two fields: the 49.Em selector 50field which specifies the types of messages and priorities to which the 51line applies, and an 52.Em action 53field which specifies the action to be taken if a message 54.Xr syslogd 55receives matches the selection criteria. 56The 57.Em selector 58field is separated from the 59.Em action 60field by one or more tab characters. 61.Pp 62The 63.Em Selectors 64function 65are encoded as a 66.Em facility , 67a period (``.''), and a 68.Em level , 69with no intervening white-space. 70Both the 71.Em facility 72and the 73.Em level 74are case insensitive. 75.Pp 76The 77.Em facility 78describes the part of the system generating the message, and is one of 79the following keywords: auth, authpriv, cron, daemon, kern, lpr, mail, 80mark, news, syslog, user, uucp and local0 through local7. 81These keywords (with the exception of mark) correspond to the 82similar 83.Dq Dv LOG_ 84values specified to the 85.Xr openlog 3 86and 87.Xr syslog 3 88library routines. 89.Pp 90The 91.Em level 92describes the severity of the message, and is a keyword from the 93following ordered list (higher to lower): emerg, alert, crit, err, 94warning, notice and debug. 95These keywords correspond to the 96similar 97.Pq Dv LOG_ 98values specified to the 99.Xr syslog 100library routine. 101.Pp 102See 103.Xr syslog 3 104for a further descriptions of both the 105.Em facility 106and 107.Em level 108keywords and their significance. 109.Pp 110If a received message matches the specified 111.Em facility 112and is of the specified 113.Em level 114.Em (or a higher level) , 115the action specified in the 116.Em action 117field will be taken. 118.Pp 119Multiple 120.Em selectors 121may be specified for a single 122.Em action 123by separating them with semicolon (``;'') characters. 124It is important to note, however, that each 125.Em selector 126can modify the ones preceding it. 127.Pp 128Multiple 129.Em facilities 130may be specified for a single 131.Em level 132by separating them with comma (``,'') characters. 133.Pp 134An asterisk (``*'') can be used to specify all 135.Em facilities 136or all 137.Em levels . 138.Pp 139The special 140.Em facility 141``mark'' receives a message at priority ``info'' every 20 minutes 142(see 143.Xr syslogd 8 ) . 144This is not enabled by a 145.Em facility 146field containing an asterisk. 147.Pp 148The special 149.Em level 150``none'' disables a particular 151.Em facility . 152.Pp 153The 154.Em action 155field of each line specifies the action to be taken when the 156.Em selector 157field selects a message. 158There are four forms: 159.Bl -bullet 160.It 161A pathname (beginning with a leading slash). 162Selected messages are appended to the file. 163.It 164A hostname (preceded by an at (``@'') sign). 165Selected messages are forwarded to the 166.Xr syslogd 167program on the named host. 168.It 169A comma separated list of users. 170Selected messages are written to those users 171if they are logged in. 172.It 173An asterisk. 174Selected messages are written to all logged-in users. 175.El 176.Pp 177Blank lines and lines whose first non-blank character is a hash (``#'') 178character are ignored. 179.Sh EXAMPLES 180.Pp 181A configuration file might appear as follows: 182.Bd -literal 183# Log all kernel messages, authentication messages of 184# level notice or higher and anything of level err or 185# higher to the console. 186# Don't log private authentication messages! 187*.err;kern.*;auth.notice;authpriv.none /dev/console 188 189# Log anything (except mail) of level info or higher. 190# Don't log private authentication messages! 191*.info;mail.none;authpriv.none /var/log/messages 192 193# The authpriv file has restricted access. 194authpriv.* /var/log/secure 195 196# Log all the mail messages in one place. 197mail.* /var/log/maillog 198 199# Everybody gets emergency messages, plus log them on another 200# machine. 201*.emerg * 202*.emerg @arpa.berkeley.edu 203 204# Root and Eric get alert and higher messages. 205*.alert root,eric 206 207# Save mail and news errors of level err and higher in a 208# special file. 209uucp,news.crit /var/log/spoolerr 210.Ed 211.Sh FILES 212.Bl -tag -width /etc/syslog.conf -compact 213.It Pa /etc/syslog.conf 214The 215.Xr syslogd 8 216configuration file. 217.El 218.Sh BUGS 219The effects of multiple selectors are sometimes not intuitive. 220For example ``mail.crit,*.err'' will select ``mail'' facility messages at 221the level of ``err'' or higher, not at the level of ``crit'' or higher. 222.Sh SEE ALSO 223.Xr syslog 3 , 224.Xr syslogd 8 225.Sh HISTORY 226The 227.Nm syslog.conf 228file format is 229.Ud . 230