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

NAME

6       logger - log messages
7

SYNOPSIS

9       logger string ...
10

DESCRIPTION

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

OPTIONS

21       None.
22

OPERANDS

24       The following operand shall be supported:
25
26       string One  of  the  string  arguments  whose contents are concatenated
27              together, in the order specified, separated by single <space>s.
28
29

STDIN

31       Not used.
32

INPUT FILES

34       None.
35

ENVIRONMENT VARIABLES

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

ASYNCHRONOUS EVENTS

67       Default.
68

STDOUT

70       Not used.
71

STDERR

73       The standard error shall be used only for diagnostic messages.
74

OUTPUT FILES

76       Unspecified.
77

EXTENDED DESCRIPTION

79       None.
80

EXIT STATUS

82       The following exit values shall be returned:
83
84        0     Successful completion.
85
86       >0     An error occurred.
87
88

CONSEQUENCES OF ERRORS

90       Default.
91
92       The following sections are informative.
93

APPLICATION USAGE

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

EXAMPLES

102       A batch application, running non-interactively, tries to read a config‐
103       uration file and fails; it may attempt to notify the system administra‐
104       tor with:
105
106
107              logger myname: unable to read file foo. [timestamp]
108

RATIONALE

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

FUTURE DIRECTIONS

133       None.
134

SEE ALSO

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