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
11

NAME

13       logger — log messages
14

SYNOPSIS

16       logger string...
17

DESCRIPTION

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

OPTIONS

28       None.
29

OPERANDS

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

STDIN

38       Not used.
39

INPUT FILES

41       None.
42

ENVIRONMENT VARIABLES

44       The following environment variables shall affect the execution of  log‐
45       ger:
46
47       LANG      Provide  a  default  value for the internationalization vari‐
48                 ables that are unset or null. (See the Base Definitions  vol‐
49                 ume  of POSIX.1‐2008, Section 8.2, Internationalization Vari‐
50                 ables for the precedence  of  internationalization  variables
51                 used to determine the values of locale categories.)
52
53       LC_ALL    If  set  to  a non-empty string value, override the values of
54                 all the other internationalization variables.
55
56       LC_CTYPE  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
63                 error. (This means diagnostics from logger  to  the  user  or
64                 application, not diagnostic messages that the user is sending
65                 to the system administrator.)
66
67       NLSPATH   Determine the location of message catalogs for the processing
68                 of LC_MESSAGES.
69

ASYNCHRONOUS EVENTS

71       Default.
72

STDOUT

74       Not used.
75

STDERR

77       The standard error shall be used only for diagnostic messages.
78

OUTPUT FILES

80       Unspecified.
81

EXTENDED DESCRIPTION

83       None.
84

EXIT STATUS

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

CONSEQUENCES OF ERRORS

93       Default.
94
95       The following sections are informative.
96

APPLICATION USAGE

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

EXAMPLES

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

RATIONALE

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

FUTURE DIRECTIONS

135       None.
136

SEE ALSO

138       lp, mailx, write
139
140       The  Base  Definitions  volume  of POSIX.1‐2008, Chapter 8, Environment
141       Variables
142
144       Portions of this text are reprinted and reproduced in  electronic  form
145       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
146       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
147       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
148       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
149       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) 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.unix.org/online.html .
154
155       Any  typographical  or  formatting  errors that appear in this page are
156       most likely to have been introduced during the conversion of the source
157       files  to  man page format. To report such errors, see https://www.ker
158       nel.org/doc/man-pages/reporting_bugs.html .
159
160
161
162IEEE/The Open Group                  2013                           LOGGER(1P)
Impressum