logger
******

logger is a program to make entries in the system log files. It provides a shell command interface to the system log module. See Syslog (The GNU C Library Reference Manual), for details.

The message can contain a priority code, which should be a preceding decimal number in angle braces, for example, <5>.  This priority code should map into the priorities defined in the include file <sys/syslog.h>.

Invoking
========

The options are as follows :

-i
     Log the process ID of the logger process with each line.

-s
     Log the message to standard error, as well as the system log.  This option might not be supported on all systems.

-f FILE
--file=FILE
     Log the content of the specified file.

-p PRIORITY
--priority=PRIORITY
     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 at the informational level in the local3 facility.  The default is user.notice.

     The actual list of supported facilities and levels is system specific.

-t TAG
--tag=TAG
     Mark every line in the log with the specified tag.

The options are followed by the message which should be written to the log.  If not specified, and the -f flag is not provided, standard input is logged.

The logger utility exits 0 on success, and >0 if an error occurs.

The following examples illustrate the usage of the logger command.

     logger System rebooted

     logger -p local0.notice -t HOSTIDM -f /dev/idmc