Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

syslog.conf(4) [osf1 man page]

syslog.conf(4)						     Kernel Interfaces Manual						    syslog.conf(4)

NAME
syslog.conf - syslogd configuration file SYNOPSIS
facility.severity destination Where: Is part of the system generating the message, specified in /usr/include/sys/syslog_pri.h. See also the syslogd(8) reference page. The severity level, which can be emerg, alert, crit, err, warning, notice, info, or debug. See /usr/include/sys/syslog_pri.h. The syslogd daemon logs all messages of the specified severity level plus all messages of greater severity. For example, if you specify level err, all messages of levels err, crit, alert, and emerg or panic are logged. A local file pathname to a log file, a host name for remote logging or a list of users. In the latter case the users will receive messages when they are logged in. An asterisk (*) causes a message to be sent to all users who are currently logged in. DESCRIPTION
The /etc/syslog.conf file is a system file that enables you to configure or filter events that are to be logged by syslogd. You can specify more than one facility and its severity level by separating them with semicolons. You can specify more than one facility logs to the same file by separating the facilities with commas, as shown in the EXAMPLES section. The syslogd daemon ignores blank lines and lines that begin with an octothorpe (#). You can specify # as the first character in a line to include comments in the file or to disable an entry. The facility and severity level are separated from the destination by one or more tab characters. If you want the syslogd daemon to use a configuration file other than the default, you must specify the file name with the following com- mand: # syslogd -f config_file Daily Log Files You can specify in the /etc/syslog.conf file that the syslogd daemon create daily log files. To create daily log files, use the following syntax to specify the path name of the message destination: /var/adm/syslog.dated/ { file} The file variable specifies the name of the log file, for example, mail.log or kern.log. If you specify a /var/adm/syslog.dated/file path name destination, each day the syslogd daemon creates a sub-directory under the /var/adm/syslog.dated directory and a log file in the sub-directory, using the following syntax: /var/adm/syslog.dated/ date / file Where: The date variable specifies the day, month, and time that the log file was created. The file variable specifies the name of the log file you previously specified in the /etc/syslog.conf file. The syslogd daemon automatically cre- ates a new date directory every 24 hours and also when you boot the system. The current directory is a link to the latest date directory. To get the latest logs, you only need to reference the /var/adm/syslog.dated/current directory. EXAMPLES
The following is a sample /etc/syslog.conf file: # # syslogd config file # # facilities: kern user mail daemon auth syslog lpr binary # priorities: emerg alert crit err warning notice info debug # kern.debug /var/adm/syslog.dated/kern.log user.debug /var/adm/sys- log.dated/user.log daemon.debug /var/adm/syslog.dated/daemon.log auth.crit;syslog.debug /var/adm/syslog.dated/syslog.log mail,lpr.debug /var/adm/syslog.dated/misc.log msgbuf.err /var/adm/crash.dated/msgbuf.savecore kern.debug /var/adm/messages kern.debug /dev/console *.emerg * FILES
/etc/syslog.conf /etc/syslog.auth - Authorization file for remote logging. /usr/include/sys/syslog_pri.h - Common components of a syslog event log record. RELATED INFORMATION
Commands: /usr/sbin/syslogd(8), /usr/sbin/binlogd(8) System Administration delim off syslog.conf(4)

Check Out this Related Man Page

SYSLOGD(8)						      System Manager's Manual							SYSLOGD(8)

NAME
syslogd - log systems messages SYNOPSIS
syslogd [ -fconfigfile ] [ -mmarkinterval ] [ -d ] DESCRIPTION
Syslogd reads and logs messages into a set of files described by the configuration file /etc/syslog.conf. Each message is one line. A message can contain a priority code, marked by a number in angle braces at the beginning of the line. Priorities are defined in <sys/sys- log.h>. Syslogd reads from the UNIX domain socket /dev/log, from an Internet domain socket specified in /etc/services, and from the spe- cial device /dev/klog (to read kernel messages). Syslogd configures when it starts up and whenever it receives a hangup signal. Lines in the configuration file have a selector to deter- mine the message priorities to which the line applies and an action. The action field are separated from the selector by one or more tabs. Selectors are semicolon separated lists of priority specifiers. Each priority has a facility describing the part of the system that gener- ated the message, a dot, and a level indicating the severity of the message. Symbolic names may be used. An asterisk selects all facili- ties. All messages of the specified level or higher (greater severity) are selected. More than one facility may be selected using commas to separate them. For example: *.emerg;mail,daemon.crit Selects all facilities at the emerg level and the mail and daemon facilities at the crit level. Known facilities and levels recognized by syslogd are those listed in syslog(3) without the leading ``LOG_''. The additional facility ``mark'' has a message at priority LOG_INFO sent to it every 20 minutes (this may be changed with the -m flag). The ``mark'' facility is not enabled by a facility field containing an asterisk. The level ``none'' may be used to disable a particular facility. For example, *.debug;mail.none Sends all messages except mail messages to the selected file. The second part of each line describes where the message is to be logged if this line is selected. There are four forms: o A filename (beginning with a leading slash). The file will be opened in append mode. o A hostname preceeded by an at sign (``@''). Selected messages are forwarded to the syslogd on the named host. o A comma separated list of users. Selected messages are written to those users if they are logged in. o An asterisk. Selected messages are written to all logged-in users. Blank lines and lines beginning with `#' are ignored. For example, the configuration file: kern,mark.debug /dev/console *.notice;mail.info /usr/spool/adm/syslog *.crit /usr/adm/critical kern.err @ucbarpa *.emerg * *.alert eric,kridle *.alert;auth.warning ralph logs all kernel messages and 20 minute marks onto the system console, all notice (or higher) level messages and all mail system messages except debug messages into the file /usr/spool/adm/syslog, and all critical messages into /usr/adm/critical; kernel messages of error severity or higher are forwarded to ucbarpa. All users will be informed of any emergency messages, the users ``eric'' and ``kridle'' will be informed of any alert messages, and the user ``ralph'' will be informed of any alert message, or any warning message (or higher) from the authorization system. The flags are: -f Specify an alternate configuration file. -m Select the number of minutes between mark messages. -d Turn on debugging. Syslogd creates the file /var/run/syslog.pid, if possible, containing a single line with its process id. This can be used to kill or reconfigure syslogd. To bring syslogd down, it should be sent a terminate signal (e.g. kill `cat /var/run/syslog.pid`). FILES
/etc/syslog.conf the configuration file /var/run/syslog.pid the process id /dev/log Name of the UNIX domain datagram log socket /dev/klog The kernel log device SEE ALSO
logger(1), syslog(3) 4.2 Berkeley Distribution November 16, 1996 SYSLOGD(8)
Man Page