January 2003
Intermediate to advanced
832 pages
32h 40m
English
logger
logger [options] [messages]
Logs messages to the system log
(/var/log/system.log). Command-line messages are
logged if provided. Otherwise, messages are read and logged,
line-by-line, from the file provided via -f. If no
such file is given, logger reads messages from
standard input.
-f
file
Read and log messages from file.
-i
Log the process ID of the logger process with each
message.
-p
priority
Log each message with the given priority.
Priorities have the form
facility.level. The default
is user.notice. See syslog(3)
for more information.
-s
Also log messages to standard error.
-t
tag
Add tag to each message line.
Warn about upcoming trouble:
logger -p user.emerg 'Incoming Klingon battleship!'