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>
34                 characters.
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 vari‐
47                 ables that are unset or null. (See the Base Definitions  vol‐
48                 ume  of POSIX.1‐2017, Section 8.2, Internationalization Vari‐
49                 ables for the precedence  of  internationalization  variables
50                 used to determine the values of locale categories.)
51
52       LC_ALL    If  set  to  a non-empty string value, override the values of
53                 all the other internationalization variables.
54
55       LC_CTYPE  Determine the locale for the interpretation of  sequences  of
56                 bytes of text data as characters (for example, single-byte as
57                 opposed to multi-byte characters in arguments).
58
59       LC_MESSAGES
60                 Determine the locale that should be used to affect the format
61                 and  contents  of  diagnostic  messages  written  to standard
62                 error. (This means diagnostics from logger  to  the  user  or
63                 application, not diagnostic messages that the user is sending
64                 to the system administrator.)
65
66       NLSPATH   Determine the location of message catalogs for the processing
67                 of LC_MESSAGES.
68

ASYNCHRONOUS EVENTS

70       Default.
71

STDOUT

73       Not used.
74

STDERR

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

OUTPUT FILES

79       Unspecified.
80

EXTENDED DESCRIPTION

82       None.
83

EXIT STATUS

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

CONSEQUENCES OF ERRORS

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

APPLICATION USAGE

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

EXAMPLES

104       A batch application, running non-interactively, tries to read a config‐
105       uration file and fails; it may attempt to notify the system administra‐
106       tor with:
107
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‐2017.
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‐2017. 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‐2017, Chapter 8, Environment
141       Variables
142
144       Portions of this text are reprinted and reproduced in  electronic  form
145       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
146       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
147       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
148       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
149       event of any discrepancy between this version and the original IEEE and
150       The Open Group Standard, the original IEEE and The Open Group  Standard
151       is  the  referee document. The original Standard can be obtained online
152       at http://www.opengroup.org/unix/online.html .
153
154       Any typographical or formatting errors that appear  in  this  page  are
155       most likely to have been introduced during the conversion of the source
156       files to man page format. To report such errors,  see  https://www.ker
157       nel.org/doc/man-pages/reporting_bugs.html .
158
159
160
161IEEE/The Open Group                  2017                           LOGGER(1P)
Impressum