1LOGGER(1)                 BSD General Commands Manual                LOGGER(1)
2

NAME

4     logger — a shell command interface to the syslog(3) system log module
5

SYNOPSIS

7     logger [-isd] [-f file] [-p pri] [-t tag] [-u socket] [message ...]
8

DESCRIPTION

10     Logger makes entries in the system log.  It provides a shell command
11     interface to the syslog(3) system log module.
12
13     Options:
14
15     -i       Log the process id of the logger process with each line.
16
17     -s       Log the message to standard error, as well as the system log.
18
19     -f file  Log the specified file.
20
21     -p pri   Enter the message with the specified priority.  The priority may
22              be specified numerically or as a ``facility.level'' pair.  For
23              example, ``-p local3.info'' logs the message(s) as informational
24              level in the local3 facility.  The default is ``user.notice.''
25
26     -t tag   Mark every line in the log with the specified tag.
27
28     -u sock  Write to socket as specified with socket instead of builtin sys‐
29              log routines.
30
31     -d       Use a datagram instead of a stream connection to this socket.
32
33     --       End the argument list. This is to allow the message to start
34              with a hyphen (-).
35
36     message  Write the message to log; if not specified, and the -f flag is
37              not provided, standard input is logged.
38
39     The logger utility exits 0 on success, and >0 if an error occurs.
40
41     Valid facility names are: auth, authpriv (for security information of a
42     sensitive nature), cron, daemon, ftp, kern (can’t be generated from user
43     process), lpr, mail, news, security (deprecated synonym for auth), sys‐
44     log, user, uucp, and local0 to local7, inclusive.
45
46     Valid level names are): alert, crit, debug, emerg, err, error (deprecated
47     synonym for err), info, notice, panic (deprecated synonym for emerg),
48     warning, warn (deprecated synonym for warning).  For the priority order
49     and intended purposes of these levels, see syslog(3).
50

EXAMPLES

52           logger System rebooted
53
54           logger -p local0.notice -t HOSTIDM -f /dev/idmc
55

SEE ALSO

57     syslog(3), syslogd(8)
58

STANDARDS

60     The logger command is expected to be IEEE Std 1003.2 (“POSIX.2”) compati‐
61     ble.
62

AVAILABILITY

64     The logger command is part of the util-linux-ng package and is available
65     from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
66
674.3 Berkeley Distribution        June 6, 1993        4.3 Berkeley Distribution
Impressum