socklog(8)
π socklog(8) β the System Manager's Manual glow-up π
okay bestie, gather round, because we're talking about socklog, and it's literally a small and secure syslogd replacement made to vibe with runit. she's tiny, she's careful, she's iconic. let's get into it π
β¨ NAME β¨
socklog β a small and secure syslogd replacement, designed for use with runit. no cap, that's the whole thing. π
πΈ SYNOPSIS πΈ
socklog [-rRU] [unix] [path]
socklog [-rR] inet [ip] [port]
socklog [-rR] ucspi [args]
three modes, three moods. pick your fighter. π¦
π DESCRIPTION π
so here's the tea: socklog gets run under runit's runsv(8), and it writes the syslog messages it receives β either from a unix domain socket path or from an inet udp socket ip:port β through a pipe that runsv(8) hands it, straight to a svlogd(8) process. that's the pipeline, bestie, and it slays. π₯
socklog can also run as an ucspi application, which lets it listen on a unix domain stream socket and do more flexible distributed logging. fancy. β¨
if the environment variables $UID and/or $GID are present, socklog drops permissions to those ids after creating and binding the socket β and not in ucspi mode, just so we're clear. π
socklog converts syslog facility and priority info into names, in the form facility.priority:, matching whatever's in /usr/include/syslog.h at compile time, if that file's even there. iykyk. π
on solaris, socklog also accepts sun_stream as the first argument. peep the web page for the deets. π
π§ UNIX SOCKET π§
socklog [ unix ] [ path ]
start socklog with unix as the 1st argument and she'll listen to the unix domain socket path. if path is left out, the default is /dev/log. πΈ
and here's the cute part: you can totally skip the 1st argument, because the default is unix anyway. low maintenance queen. π
β INET SOCKET β
socklog inet [ ip ] [ port ]
start socklog with inet as the 1st argument and she'll listen to the inet udp socket ip:port. π‘
- if ip starts with
0,socklogbinds to all local interfaces. all of them. every single one. π«Ά - if port is less than or equal to
1024,socklogmust be run by root. no exceptions, bestie, that's a privilege thing. π - port may be omitted β default is
514. - ip may be omitted β default is
0.
also, socklog prepends a.b.c.d: to every syslog message it receives, where a.b.c.d is the ip address of the connecting system. so you always know who's talking. π
π¦ UCSPI MODE π¦
socklog ucspi [ args ]
start socklog with ucspi as the 1st argument and she runs as an ucspi application. normally you'd only ever start socklog in ucspi mode through an ucspi server tool β think tcpsvd(8), tcpserver(1) or unixserver. she doesn't just show up like that on her own. π
for each arg, socklog will prepend $arg: to every syslog message, if the environment variable $arg is present. and yes, there's a limit β maximum is 8. don't get greedy. π
π OPTIONS π
-rβ raw. write the raw syslog messages (no conversion of facility and priority) to the pipe, in addition to the log messages with syslog facility and priority converted to names. so you get both, because why choose. β¨-Rβ raw only. same as-rabove, but writes the raw syslog messages only. no name-converted versions, just the raw ones. periodt. π-Uβ respect umask. don't set umask to0before creating a unix domain socket; respect the current setting ofumask(2)instead. heads up though β this option only takes effect in unix mode. π
π SEE ALSO π
sv(8), runsvdir(8), runsv(8), svlogd(8), tryto(1), uncat(1), socklog-check(8), tcpsvd(8), nc(1)
and the links, bestie:
π AUTHOR π
Gerrit Pape <pape@smarden.org>
and that's the whole page, babes. this was the socklog(8) entry from the System Manager's Manual β the socklog(8) manual page, to be exact. go forth and log responsibly. ππ«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: socklog 2.1.2
- ubuntu resolute: socklog 2.1.2+repack-1 Β· BSD-3-Clause
- ubuntu stonking: socklog 2.1.2+repack-3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms