*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: logger | Section: 1 | Source: Digital UNIX | File: logger.1.gz
logger(1) General Commands Manual logger(1) NAME logger - Makes entries in the system log SYNOPSIS /usr/bin/logger [-f file] [-i] [-p[facility.]priority] [-t tag] es- sage...] logger [-b] essage...] STANDARDS Interfaces documented on this reference page conform to industry stan- dards as follows: logger: XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about in- dustry standards and associated tags. OPTIONS [DIGITAL] 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. [DIGITAL] Logs all lines in file. [DIGITAL] Logs the process ID (PID) of the logger process with each line. [DIGITAL] Enters the message with the specified priority and, if specified, from the specified facility. [DIGITAL] You can specify priority as either an alphabetic string or its integer equivalent. You can specify the following values for the priority variable: [DIGITAL] (0) [DIGITAL] The system is unusable. (0) [DIGITAL] Action must be taken immedi- ately. (1) [DIGITAL] Critical conditions. (2) [DIGITAL] Er- ror conditions. (3) [DIGITAL] (3) [DIGITAL] (4) [DIGI- TAL] Warning conditions. (4) [DIGITAL] Normal but significant condition. (5) [DIGITAL] Informational. (6) [DIGITAL] Debug- level messages. (7) [DIGITAL] You can also specify a value for the facility vari- able, which indicates the source of the event. You can specify facility as either an alphabetic string or its integer equiva- lent. The integer values appear in parentheses. You can spec- ify the following values for the facility variable: [DIGI- TAL] Kernel messages. (0) [DIGITAL] Random user-level mes- sages. (8) [DIGITAL] Mail system. (16) [DIGITAL] System dae- mons. (24) [DIGITAL] Security/authorization messages. (32) [DIGITAL] (32) [DIGITAL] Messages syslogd generates inter- nally. (40) [DIGITAL] Line printer subsystem. (48) [DIGI- TAL] Network news subsystem. (56) [DIGITAL] UUCP subsystem. (64) [DIGITAL] Clock daemon. (72) [DIGITAL] (128) [DIGI- TAL] (136) [DIGITAL] (144) [DIGITAL] (152) [DIGITAL] (160) [DIGITAL] (168) [DIGITAL] (176) [DIGITAL] (184) [DIGI- TAL] Precedes each entry in the log with tag. OPERANDS 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. 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 in- formation. NOTES The effects of the environment variable LC_MESSAGES apply only to diag- nostic messages generated by logger, and not to any messages written by the use of the command. EXIT STATUS The following exit values are returned: Successful completion. An er- ror occurred. EXAMPLES To log the system reboot, including the process ID of the process run- ning logger, enter: logger -i System rebooted To log each line in the file build.events with the tag trial build preceding them, enter: log- ger -f build.events -t "trial build" The following commands are equiva- lent 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, en- ter: logger -p debug my message To specify the debug priority with a priority number, enter: logger -p 7 my message To specify both debug priority and the user facility, 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: log- ger -p user.7 my message logger -p 8.debug my message ENVIRONMENT VARIABLES The following environment variables affect the execution of logger: Provides a default value for the internationalization variables that are unset or null. If LANG 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. Deter- mines the location of message catalogues for the processing of LC_MES- SAGES. SEE ALSO Commands: binlogd(8), syslogd(8), uerf(8) Functions: syslog(3) Standards: standards(5) logger(1)

Navigation Options