STDSYSLOG(1)
π STDSYSLOG π
okay so bestie, welcome to stdsyslog(1) β it lives in the General Commands Manual section of your friendly neighborhood Unix, and it is literally the moment your program's output stops being a mystery and starts being a permanent record. no cap. π«Ά
β¨ NAME β¨
stdsyslog β log a program's output to the system log
πΈ SYNOPSIS πΈ
stdsyslog [-d fd:level] [-f facility] [-p pidfile] cmd [args...]
stdsyslog -f list
stdsyslog -l
stdsyslog -V | -h
π DESCRIPTION π
So the tea is this: the stdsyslog utility runs a program for you, slurps up everything it spits out onto a set of file descriptors (by default that's the standard output and the standard error streams), and then logs all of it to the system log. main character energy for your logs, honestly. π
The stdsyslog utility may be passed the following options:
-dβ tell it the level to use for messages coming off a file descriptor. you can β and honestly you probably should β use this more than once. and if you pass no-doptions at all,stdsyslogjust assumes-d 1:info -d 2:err, like, it logs the program's standard output with theinfolevel and the errors with theerrone. default queen behavior. β¨-fβ pick the syslog facility to use, or passlistto get a list of the available values. if you don't specify anything,stdsysloguses thedaemonfacility.-hβ shows you the program usage info and dips out. exit, stage left. πͺ-lβ lists all the available syslog levels.-pβ name the file you want the child process ID written into.-Vβ shows program version info and dips out. πͺ
π¦ EXAMPLES π¦
the following examples are shown as given to the shell, so you can copy-paste them straight into your terminal and feel iconic. π
Log the string information to the daemon:info syslog facility:
stdsyslog echo information
Log the string error to the local4:err facility:
stdsyslog -f local4 sh -c 'echo error 1>&2'
Run the sprog program with two arguments, some and args, store its process ID into the sprog.pid file and log the messages appearing on its standard output to daemon:info and the ones on its standard error stream to daemon:crit:
stdsyslog -p sprog.pid -d 1:info -d 2:crit sprog some args
π SEE ALSO π
π TODO π
planned or at least possible enhancements β the glow-up list, fr fr:
- Command-line flags to specify
openlog(3)options. - Command-line flags to specify patterns for text appearing on some file descriptors for possibly logging with another priority, e.g. lines appearing on the standard error stream starting with
DBG:should be logged with the debug priority.
and that's the whole page, bestie π this one came out of Debian and it's dated February 8, 2013 β oldie but a goodie, and now you know it through and through. go log something. πβ¨π¦
π¦ where this page comes from
- debian trixie: stdsyslog 0.03.4-1 Β· BSD-2-Clause
- ubuntu questing: stdsyslog 0.03.4-1
- ubuntu resolute: stdsyslog 0.03.4-1build1 Β· BSD-2-Clause
- ubuntu stonking: stdsyslog 0.03.4-2 Β· BSD-2-Clause
- π the page's license: BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms