Information Technology Reference
In-Depth Information
Table 13.4
The Default /etc/syslog.conf File
Facility/Severity
Action
Description
*.err;kern.notice;auth.notice
/dev/sysmsg
All
error
,
kernel.notice
(and higher),
and
auth.notice
(and higher)
messages are written to the
/dev/sysmsg
file.
*.err;kern.debug;
/var/adm/messages
All
error
,
kern.debug
(and
daemon.notice;mail.crit
higher),
daemon.notice
(and
higher), and
mail.crit
(and higher)
messages are written to the
/var/adm/messages
file.
*.alert;kern.err;daemon.err
operator
All
alert
,
kern.err
(and higher), and
daemon.err
(and higher) messages
are written to the operator login
account (if currently logged in).
*.alert
root
All
alert
messages are written to the
root account (if currently logged in).
*.emerg
*
All
emerg
messages are written
to all login accounts currently
logged in.
Unless an entry exists for a particular facility/severity combination, messages gener-
ated using that particular combination are discarded. Be careful not to delete any of
the existing entries unless those messages are being handled by a new entry. The
most commonly used default log file is
/var/adm/messages
.
Messages Generated by the logger Command
The
logger(1)
command can be used by users, shell scripts, or programs to
generate syslog messages. Table 13.5 lists the command-line arguments for
the
logger
command.
Table 13.5
Command-Line Arguments for the logger Command
Argument
Description
message
Specifies the text of
message
.
-f
file
Uses the contents of
file
as the message.
-i
Includes the process ID (PID) of the
logger
command on each message.
-p
priority
Specifies the
priority
of the message, which can be specified as
facility.level
or a number. The default is
user.notice
.
-t
tag
Includes
tag
on each message.