logger(1)
π logger β bestie's guide to yelling into the system log π
okay so you're holding the logger(1) page from the User's Reference Manual and honestly? it's giving main character energy for such a tiny command. let's get into it π«Ά
β¨ NAME β¨
logger β make entries in the system log
like. that's it. that's the whole job. she writes stuff into the log. iconic behavior honestly π
πΈ SYNOPSIS πΈ
logger [options ...] [message ...]
yeah that's the whole vibe. options, then a message, or don't. she's flexible π
π¦ DESCRIPTION π¦
so logger is basically a lil shell-command front door to the syslog(3) system log module. that's the tea. you run it, it talks to syslog, syslog writes the line. no cap. β¨
π OPTIONS π
okay this is the part everyone skips and then wonders why nothing works. NOT you tho. you're gonna read all of them. periodt.
-4,--ipv4β use IPv4 to connect to hosts. old reliable fr fr.-6,--ipv6β use IPv6 to connect to hosts. the future is now bestie π-S,--source_ip_ β set the source IP address. you're picking which face she shows up with π-h,--host_host_ β log to _host_ instead of to the default/dev/log. going remote, we love a road trip π-u,--unix_sock_ β log to UNIX socket _sock_ instead of/dev/log. different socket, same energy π§¦-i,--id[_pid_] β log the process id of theloggerprocess with each line. so people know who said it. very "no anonymous messages" of her π-s,--stderrβ log the message to standard error, as well as the system log. double posting. she contains multitudes.-f,--file_file_ β log the specified _file_. whole file, one go π-p,--priority_pri_ β enter the message with the specified priority. the priority can be numeric or a"facility.level"pair. for example,"-p local3.info"logs the message(s) as informational level in thelocal3facility. the default is"user.notice."β remember that default, it's the one people always forget π-t,--tag_tag_ β mark every line in the log with the specified _tag_. your lil signature. brand it π--usageβ display a short usage message. the tl;dr version.-?,--helpβ display a help list. the slightly longer tl;dr version.-V,--versionβ display program version. for when you need to know which era of her you're talking to.- _message_ β write the message to log; if not specified, and the
-fflag is not provided, standard input is logged. so like, if you give her nothing, she'll take it from stdin. she's not picky π
π«Ά important lil note bestie: theloggerutility exits0on success, and>0if an error occurs. check that exit status. always. it's free information.
π₯ EXAMPLES π₯
look at her go:
logger System rebooted
logger -p local0.notice -t HOSTIDM -f /dev/idmc
first one: just says the thing. second one: priority local0.notice, tag HOSTIDM, reading from the file /dev/idmc. chef's kiss π€β¨
β SEE ALSO β
go read those too. iykyk π§
π STANDARDS π
the logger command is expected to be IEEE Std 1003.2 (βPOSIX.2β) compatible. so like, standards-compliant. she's not just cute, she's certified cute π
and that's the page!! this came from GNU Network Utilities, dated February 15, 2019. go log something slay-worthy, bestie πΈπβ¨
π¦ where this page comes from
- debian trixie: inetutils-tools 2:2.6-3+deb13u3
- ubuntu questing: inetutils-tools 2:2.6-1ubuntu3
- ubuntu questing: inetutils-tools 2:2.6-1ubuntu3.2
- ubuntu resolute: inetutils-tools 2:2.7-2ubuntu1
- ubuntu resolute: inetutils-tools 2:2.7-2ubuntu1.1
- ubuntu stonking: inetutils-tools 2:2.8-2ubuntu1
- Copyright (c) 1983, 1990, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms