Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ logger(1) — Digital UNIX 3.2c

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

binlogd(8)

syslogd(8)

uerf(8)

syslog(3)

logger(1)  —  Commands

NAME

logger − Makes entries in the system log

SYNOPSIS

/usr/bin/logger [-f file] [-i] [-p priority] [-t tag]\
[message...]
logger -b [message ...]

DESCRIPTION

The logger command makes the specified entries in the system log file. 

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 syslog and syslogd for more information. 

You can specify the message to be used for entries on the command line or with the -f file option, which specifies that each line in file be logged as an entry.  If you do not specify message or -f, logger reads standard input. 

FLAGS

-bLogs 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 even log file, which is used for system maintenance and troubleshooting.   The −b flag cannot be used with any other flags. 

-f fileLogs all lines in file. 

-iLogs the process ID (PID) of the logger process with each line. 

-p priority[.facility]
Enters the message with the specified priority and, if specified, from the specified facility. 

You can specify priority as either an alphabetic string or its integer equivalent.  You can specify the following values for the priority variable:

panic(0)

emergThe system is unusable.  (0)

alertAction must be taken immediately.  (1)

critCritical conditions.  (2)

errError conditions.  (3)

error(3)

warn(4)

warningWarning conditions.  (4)

noticeNormal but significant condition.  (5)

infoInformational. (6)

debugDebug-level messages.  (7)

You can also specify a value for the facility variable, which indicates the source of the event.  You can specify facility as either an alphabetic string or its integer equivalent.  The integer values appear in parentheses.  You can specify the following values for the facility variable:

kernKernel messages. (0)

userRandom user-level messages. (8)

mailMail system. (16)

daemonSystem daemons. (24)

authSecurity/authorization messages.  (32)

security(32)

syslogMessages generated internally by syslogd.  (40)

lprLine printer subsystem.  (48)

newsNetwork news subsystem.  (56)

uucpUUCP subsystem.  (64)

cronClock daemon.  (72)

local1(128)

local1(136)

local2(144)

local3(152)

local4(160)

local5(168)

local6(176)

local7(184)

-t tagPrecedes each entry in the log with tag. 

EXAMPLES

     1.To log the system reboot, including the process ID of the process running logger,  enter:

logger -i System rebooted

     2.To log each line in the file build.events with the tag trial build preceding them, enter:

logger -f build.events -t "trial build"

     3.The following commands are equivalent and enter events of warning priority to the log:

logger -p warning

logger -p 4

     4.The following commands are equivalent and enter events from the daemon facility of warning priority:

logger -p warning.daemon

logger -p 4.24

     5.To specify the debug priority with a priority name, enter:

logger -p debug my message

To specify the debug priority with a priority number, enter:

logger -p 7 my message

     6.To specify both user facility and the debug priority, enter:

logger -p user.debug my message

To specify the same facility/priority pair using numeric values, enter:

logger -p 8.7 my message

You can also combine alphabetic and numeric specifications:

logger -p user.7 my message

RELATED INFORMATION

Commands:  binlogd(8), syslogd(8), and uerf(8). 

Functions:  syslog(3). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026