LOGGER(1)
NAME
logger − make entries in the system log
SYNOPSIS
logger [ −t tag ] [ −p pri ] [ −i ] [ −f file ] [ message ... ]
DESCRIPTION
Logger provides a program interface to the syslog(3C) system log module.
A message can be given on the command line, which is logged immediately, or a file is read and each line is logged. If no file or message is specified, the contents of the standard input are logged.
Options
−t tag Mark every line in the log with the specified tag.
−p pri Enter the message with the specified priority. The priority may be specified numerically or as a “facility.level” pair. For example, “−p local3.info” logs the message(s) as informational level in the local3 facility. The default is “user.notice.”
−i Log the process ID of the logger process with each line.
−f file Log the contents of the specified file.
message The message to log; if not specified, the −f file or standard input is logged.
EXAMPLES
This command sends the message "System rebooted" to the syslog daemon:
logger System rebooted
This command sends the output of the users(1) command to the syslog daemon, marked as priority "info" and facility "local0". The message is tagged with the "USERS":
users | −p local0.info −t USERS
WARNINGS
Logger has no effect if the syslog daemon (syslogd(1M)) is not running on the system.
AUTHOR
Logger was developed by the University of California, Berkeley.
SEE ALSO
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989