LOGGER(1) | MidnightBSD General Commands Manual | LOGGER(1) |
logger
— make
entries in the system log
logger |
[-46Ais ] [-f
file] [-H
hostname] [-h
host] [-P
port] [-p
pri] [-S
addr:port]
[-t tag]
[message ...] |
The logger
utility provides a shell
command interface to the
syslog(3) system log
module.
The following options are available:
-4
logger
to use IPv4 addresses only.-6
logger
to use IPv6 addresses only.-A
logger
tries to send the message to
only one address, even if the host has more than one A or AAAA record. If
this option is specified, logger
tries to send the
message to all addresses.-i
-t
.-s
-f
file-H
hostname-h
hostlogger
currently
supports AF_INET
(IPv4),
AF_INET6
(IPv6), and
AF_LOCAL
(Unix-domain socket) address families.
The following address formats are valid in host:
-P
portsyslog
”. If
an unknown service name is used, logger
prints a
warning and falls back to port 514.-p
prifacility.level
pair.
For example, “-p
local3.info
” logs the message(s) as
informational level in the
local3 facility. The default is
“user.notice
”.-S
addr:port-h
option. The same address will be used for all
of the remote addresses when -A
flag is enabled.
Note that a numeric IPv6 address in addr must be
enclosed with “[” and “]”.-t
tag-t
tag[N] to insert specific
decimal process id instead of id of logger
.-f
flag is not provided, standard input is
logged.The logger
utility exits 0 on
success, and >0 if an error occurs.
logger System rebooted logger -p local0.notice -t HOSTIDM -f /dev/idmc
The logger
command is expected to be
IEEE Std 1003.2 (“POSIX.2”)
compatible.
July 3, 2023 | midnightbsd-3.1 |