logo

Manual Pages


Table of Contents

NAME

na_logger - record message in system logs

SYNOPSIS

logger [ -help ]

logger [ string ] ...

logger
text
.

DESCRIPTION

The logger command provides a way to record messages to the system logs. The message may be supplied as a string , on the command line itself or as multiple lines of text entered through the standard input and terminated with a period (.). The message is logged to various system logs through syslogd with a priority level of notice (see na_syslog.conf(5) and na_syslogd(8)).

The logger command should be used to record important changes in system configuration so as to facilitate system diagnosability.

OPTIONS

-help
Produces a help message.

OPERANDS

string
One of the string arguments whose contents are concatenated together, in the order specified, separated by single space characters.

Without any options or operands logger collects text from the standard input. In this mode the end of text input is designated by typing a period (.) at the beginning of a line, followed immediately by a carriage return. The maximum number of characters that can be entered in this fashion is 4096.

EXAMPLES

Logging a single line :

  toaster> logger Modified grounding
   Wed Jan 26 01:36:20 GMT [logger.usr:notice]: Modified grounding

Logging multiple lines :

  toaster> logger
  (Enter '.' and carriage return to end message)
  Painted Bezel yellow
  Replaced servernet cables
  .
   Wed Jan 26 01:38:38 GMT [logger.usr:notice]: Painted Bezel yellow
  Replaced servernet cables

FILES

/etc/messages
File where messages are logged by syslogd

SEE ALSO

na_syslogd(8), na_syslog.conf(5)


Table of Contents