OS Manuals

/usr/bin/logger

Logger from util-linux

From logger 2.42.4-r2 (os), captured 2026-11-05 by running logger --help (exit 0). permalink

Usage:
 logger [options] [<message>]

Enter messages into the system log.

Options:
 -i                       log the logger command's PID
     --id[=<id>]          log the given <id>, or otherwise the PID
 -f, --file <file>        log the contents of this file
 -e, --skip-empty         do not log empty lines when processing files
     --no-act             do everything except the write the log
 -p, --priority <prio>    mark given message with this priority
     --octet-count        use rfc6587 octet counting
     --prio-prefix        look for a prefix on every line read from stdin
 -s, --stderr             output message to standard error as well
 -S, --size <size>        maximum size for a single message
 -t, --tag <tag>          mark every line with this tag
 -n, --server <name>      write to this remote syslog server
 -P, --port <port>        use this port for UDP or TCP connection
 -T, --tcp                use TCP only
 -d, --udp                use UDP only
     --rfc3164            use the obsolete BSD syslog protocol
     --rfc5424[=<snip>]   use the syslog protocol (the default for remote);
                            <snip> can be notime, or notq, and/or nohost
     --sd-id <id>         rfc5424 structured data ID
     --sd-param <data>    rfc5424 structured data name=value
     --msgid <msgid>      set rfc5424 message id field
 -u, --socket <socket>    write to this Unix socket
     --socket-errors on|off|auto
                          print connection errors when using Unix sockets
     --journald[=<file>]  write journald entry

 -h, --help               display this help
 -V, --version            display version

For more details see logger(1).
Options (25)
OptionDescriptionSource
-iLog the PID of the logger process with each line.help + man
--id idLog the PID of the logger process with each line.help + man
-f, --file fileLog the contents of the specified file.help + man
-e, --skip-emptydo not log empty lines when processing fileshelp + man
--no-actCauses everything to be done except for writing the log message to the system log, and removing the connection to the journal.help + man
-p, --priority prioEnter the message into the log with the specified priority.help + man
--octet-countUse the RFC 6587 <https://tools.ietf.org/html/rfc6587> octet counting framing method for sending messages.help + man
--prio-prefixLook for a syslog prefix on every line read from standard input.help + man
-s, --stderrOutput the message to standard error as well as to the system log.help + man
-S, --size sizeSets the maximum permitted message size to size.help + man
-t, --tag tagMark every line to be logged with the specified tag.help + man
-n, --server nameWrite to the specified remote syslog server instead of to the system log socket.help + man
-P, --port portuse this port for UDP or TCP connectionhelp + man
-T, --tcpUse stream (TCP) only.help + man
-d, --udpUse datagrams (UDP) only.help + man
--rfc3164Use the RFC 3164 <https://tools.ietf.org/html/rfc3164> BSD syslog protocol to submit messages to a remote server.help + man
--rfc5424 snipUse the RFC 5424 <https://tools.ietf.org/html/rfc5424> syslog protocol to submit messages to a remote server.help + man
--sd-id idSpecifies a structured data element ID for an RFC 5424 message header.help + man
--sd-param dataSpecifies a structured data element parameter, a name and value pair.help + man
--msgid msgidSets the RFC 5424 <https://tools.ietf.org/html/rfc5424> MSGID field.help + man
-u, --socket socketWrite to the specified socket instead of to the system log socket.help + man
--socket-errors on|off|autoprint connection errors when using Unix socketshelp + man
--journald fileWrite a systemd journal entry.help + man
-h, --helpDisplay help text and exit.help + man
-V, --versionDisplay version and exit.help + man
Exit status (1) from the manual page
0success

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.