Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
User Commands (k - l) logger(1)
NAME
logger - Makes entries in the system log
SYNOPSIS
logger [-f file][-i][-p priority][-t tag][string ...]
The logger command makes the specified entries in the system log file.
FLAGS
-f file Logs all lines in file.
-i Logs the process ID (PID) of the logger process with each line.
-p priority
Enters the message with the specified 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 file in which entries are made depends on the current system log configuration; 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 file flag,
which specifies that each line in file 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 flag, the logger command reads the standard input.
The specific facility names that can be entered as the facility portion of the priority argument to
the -p flag 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-004 Hewlett-Packard Company 5−67