Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (k - l) logger(1)
NAME
logger - Makes entries in the system log
SYNOPSIS
logger [-f le][-i][-p priority][-t tag][string ...]
The logger command makes the specied entries in the system log le.
FLAGS
-f file Logs all lines in le.
-i Logs the process ID (PID) of the logger process with each line.
-p priority
Enters the message with the specied priority. You can specify priority as a name or a
numeric value. You can also enter a facility/priority pair, separated by a
. (dot) charac-
ter. (See Facilities and Priorities for information about valid values.)
-t tag Precedes each entry in the log with tag.
DESCRIPTION
The logger program allows information logging for later use by a system administrator or pro-
grammer in determining why noninteractive utilities have failed.
Facilities
The logger command provides a program and shell script interface to the syslog() subroutine.
The le in which entries are made depends on the current system log conguration; see the refer-
ence page for syslog() for more information.
You can specify the message to be used for entries on the command line or with the -f le ag,
which species that each line in le be logged as an entry, with the string argument. The string
argument consists of one or more character strings separated by spaces. If you do not specify
string or the -f ag, the logger command reads the standard input.
The specic facility names that can be entered as the facility portion of the priority argument to
the -p ag appear in the following list. The corresponding numeric values appear in parentheses.
kern Kernel messages (0).
user Random user-level messages (8).
mail Mail system (16).
daemon System daemons (24).
auth Security/authorization messages (32).
syslog Messages generated internally by the syslogd subroutine (40).
lpr Line printer subsystem (48).
news Network news subsystem (56).
uucp UUCP subsystem (64).
cron Clock daemon (72).
527188-007 Hewlett-Packard Company 567