unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



logger(1)							    logger(1)



NAME

  logger - Makes entries in the	system log

SYNOPSIS

  /usr/bin/logger [-f file] [-i] [-p[facility.]priority] [-t tag] [mes-
  sage...]

  logger [-b] [message...]

STANDARDS

  Interfaces documented	on this	reference page conform to industry standards
  as follows:

  logger:  XCU5.0

  Refer	to the standards(5) reference page for more information	about indus-
  try standards	and associated tags.

OPTIONS

  -b  [Tru64 UNIX]  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.

  -f file
      [Tru64 UNIX]  Logs all lines in file.

  -i  [Tru64 UNIX]  Logs the process ID	(PID) of the logger process with each
      line.

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

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

      panic
	  [Tru64 UNIX]	(0)

      emerg
	  [Tru64 UNIX]	The system is unusable.	 (0)

      alert
	  [Tru64 UNIX]	Action must be taken immediately.  (1)

      crit
	  [Tru64 UNIX]	Critical conditions.  (2)

      err [Tru64 UNIX]	Error conditions.  (3)

      error
	  [Tru64 UNIX]	(3)

      warn
	  [Tru64 UNIX]	(4)

      warning
	  [Tru64 UNIX]	Warning	conditions.  (4)

      notice
	  [Tru64 UNIX]	Normal but significant condition.  (5)

      info
	  [Tru64 UNIX]	Informational. (6)

      debug
	  [Tru64 UNIX]	Debug-level messages.  (7)

      [Tru64 UNIX]  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:

      kern
	  [Tru64 UNIX]	Kernel messages. (0)

      user
	  [Tru64 UNIX]	Random user-level messages. (8)

      mail
	  [Tru64 UNIX]	Mail system. (16)

      daemon
	  [Tru64 UNIX]	System daemons.	(24)

      auth
	  [Tru64 UNIX]	Security/authorization messages.  (32)

      security
	  [Tru64 UNIX]	(32)

      syslog
	  [Tru64 UNIX]	Messages syslogd generates internally.	(40)

      lpr [Tru64 UNIX]	Line printer subsystem.	 (48)

      news
	  [Tru64 UNIX]	Network	news subsystem.	 (56)

      uucp
	  [Tru64 UNIX]	UUCP subsystem.	 (64)

      cron
	  [Tru64 UNIX]	Clock daemon.  (72)

      local1
	  [Tru64 UNIX]	(128)

      local1
	  [Tru64 UNIX]	(136)

      local2
	  [Tru64 UNIX]	(144)

      local3
	  [Tru64 UNIX]	(152)

      local4
	  [Tru64 UNIX]	(160)

      local5
	  [Tru64 UNIX]	(168)

      local6
	  [Tru64 UNIX]	(176)

      local7
	  [Tru64 UNIX]	(184)

  -t tag
      [Tru64 UNIX]  Precedes each entry	in the log with	tag.

OPERANDS

  message
      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 informa-
  tion.

NOTES

  The effects of the environment variable LC_MESSAGES apply only to diagnos-
  tic messages generated by logger, and	not to any messages written by the
  use of the command.

EXIT STATUS

  The following	exit values are	returned:

  0   Successful completion.

  >>0  An error occurred.

EXAMPLES

   1.  To log the system reboot, including the process ID of the process run-
       ning 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 daemon.warning

	    logger -p 24.4

   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 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:
	    logger -p user.7 my	message
	    logger -p 8.debug my message



ENVIRONMENT VARIABLES

  The following	environment variables affect the execution of logger:

  LANG
      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.

  LC_ALL
      If set to	a non-empty string value, overrides the	values of all the
      other internationalization variables.

  LC_CTYPE
      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).

  LC_MESSAGES
      Determines the locale for	the format and contents	of diagnostic mes-
      sages written to standard	error.

  NLSPATH
      Determines the location of message catalogues for	the processing of
      LC_MESSAGES.

SEE ALSO

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

  Functions:  syslog(3)

  Standards:  standards(5)