logger - Makes entries in the system log
/usr/bin/logger [-f file] [-i] [-p[facility.]priority] [-t tag] [message...]
logger [-b] [message...]
Interfaces documented on this reference page conform to industry standards as follows:
logger: XPG4, XPG4-UNIX
Refer to the
reference page for more information
about industry standards and associated tags.
[Compaq] Logs the informational message to the binary event logger instead of the syslog() subroutine and enters information in the binary event log file. The uerf command with the -r 250 option reports the informational messages that are in the binary event log file, which is used for system maintenance and troubleshooting. The -b option cannot be used with any other options. [Compaq] Logs all lines in file. [Compaq] Logs the process ID (PID) of the logger process with each line. [Compaq] Enters the message with the specified priority and, if specified, from the specified facility.
You can specify the
be used for entries on the command line or with the
option, which specifies that each line in
be logged as an entry. If you do not specify
The logger command makes the specified entries in the system log file.
a program and shell script interface to the
The file in which entries are made depends on the current system log configuration;
for more information.
The effects of the environment variable
apply only to diagnostic messages generated by
logger, and not to any messages written by the use of the command.
The following exit values are returned:
An error occurred.
To log the system reboot, including the process ID of the process running logger, enter: logger -i System rebooted To log each line in the file build.events with the tag trial build preceding them, enter: logger -f build.events -t "trial build" The following commands are equivalent and enter events of warning priority to the log: logger -p warning
logger -p 4 The following commands are equivalent and enter events from the daemon facility of warning priority: logger -p daemon.warning
logger -p 24.4 To specify the debug priority with a priority name, enter: logger -p debug my message
The following environment variables affect the execution of
Provides a default value for the internationalization variables
that are unset or null. If
is unset or null, the corresponding value from the default locale is used.
If any of the internationalization variables contain an invalid setting, the
utility behaves as if none of the variables had been defined.
If set to a non-empty string value, overrides the values of
all the other internationalization variables.
Determines the locale for the interpretation of sequences
of bytes of text data as characters (for example, single-byte as opposed to
multi-byte characters in arguments).
Determines the locale for the format and contents of diagnostic
messages written to standard error.
Determines the location of message catalogues for the processing
Commands: binlogd(8), syslogd(8), uerf(8)