1LOGGER(1P)                 POSIX Programmer's Manual                LOGGER(1P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       logger - log messages
13

SYNOPSIS

15       logger string ...
16

DESCRIPTION

18       The logger utility saves a message, in an unspecified manner  and  for‐
19       mat,  containing the string operands provided by the user. The messages
20       are expected to be  evaluated  later  by  personnel  performing  system
21       administration tasks.
22
23       It  is implementation-defined whether messages written in locales other
24       than the POSIX locale are effective.
25

OPTIONS

27       None.
28

OPERANDS

30       The following operand shall be supported:
31
32       string One of the string  arguments  whose  contents  are  concatenated
33              together, in the order specified, separated by single <space>s.
34
35

STDIN

37       Not used.
38

INPUT FILES

40       None.
41

ENVIRONMENT VARIABLES

43       The  following environment variables shall affect the execution of log‐
44       ger:
45
46       LANG   Provide a default value for the  internationalization  variables
47              that  are  unset  or  null.  (See the Base Definitions volume of
48              IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
49              ables  for the precedence of internationalization variables used
50              to determine the values of locale categories.)
51
52       LC_ALL If set to a non-empty string value, override the values  of  all
53              the other internationalization variables.
54
55       LC_CTYPE
56              Determine  the  locale  for  the  interpretation of sequences of
57              bytes of text data as characters (for  example,  single-byte  as
58              opposed to multi-byte characters in arguments).
59
60       LC_MESSAGES
61              Determine  the  locale  that should be used to affect the format
62              and contents of diagnostic messages written to  standard  error.
63              (This  means diagnostics from logger to the user or application,
64              not diagnostic messages that the user is sending to  the  system
65              administrator.)
66
67       NLSPATH
68              Determine the location of message catalogs for the processing of
69              LC_MESSAGES .
70
71

ASYNCHRONOUS EVENTS

73       Default.
74

STDOUT

76       Not used.
77

STDERR

79       The standard error shall be used only for diagnostic messages.
80

OUTPUT FILES

82       Unspecified.
83

EXTENDED DESCRIPTION

85       None.
86

EXIT STATUS

88       The following exit values shall be returned:
89
90        0     Successful completion.
91
92       >0     An error occurred.
93
94

CONSEQUENCES OF ERRORS

96       Default.
97
98       The following sections are informative.
99

APPLICATION USAGE

101       This utility allows logging of information for later use  by  a  system
102       administrator  or  programmer in determining why non-interactive utili‐
103       ties have failed. The locations of the saved  messages,  their  format,
104       and  retention  period  are  all unspecified.  There is no method for a
105       conforming application to read messages, once written.
106

EXAMPLES

108       A batch application, running non-interactively, tries to read a config‐
109       uration file and fails; it may attempt to notify the system administra‐
110       tor with:
111
112
113              logger myname: unable to read file foo. [timestamp]
114

RATIONALE

116       The standard developers believed strongly that some method of  alerting
117       administrators  to errors was necessary. The obvious example is a batch
118       utility, running non-interactively, that is unable to read its configu‐
119       ration  files  or  that  is unable to create or write its results file.
120       However, the standard developers did not wish to define the  format  or
121       delivery  mechanisms  as they have historically been (and will probably
122       continue to be) very system-specific, as well as involving  functional‐
123       ity clearly outside the scope of this volume of IEEE Std 1003.1-2001.
124
125       The  text  with LC_MESSAGES about diagnostic messages means diagnostics
126       from logger to the user or application, not  diagnostic  messages  that
127       the user is sending to the system administrator.
128
129       Multiple  string  arguments  are allowed, similar to echo, for ease-of-
130       use.
131
132       Like the utilities mailx and lp,  logger  is  admittedly  difficult  to
133       test.  This  was  not  deemed sufficient justification to exclude these
134       utilities from this volume of IEEE Std 1003.1-2001. It is also arguable
135       that they are, in fact, testable, but that the tests themselves are not
136       portable.
137

FUTURE DIRECTIONS

139       None.
140

SEE ALSO

142       lp, mailx, write()
143
145       Portions of this text are reprinted and reproduced in  electronic  form
146       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
147       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
148       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
149       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
150       event of any discrepancy between this version and the original IEEE and
151       The Open Group Standard, the original IEEE and The Open Group  Standard
152       is  the  referee document. The original Standard can be obtained online
153       at http://www.opengroup.org/unix/online.html .
154
155
156
157IEEE/The Open Group                  2003                           LOGGER(1P)
Impressum