Man page - stdsyslog(1)
Packages contains this manual
Manual
STDSYSLOG (1) General Commands Manual STDSYSLOG (1)
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
The stdsyslog utility executes a program, reads everything that it outputs to a set of file descriptors (by default the standard output and standard error streams) and logs it to the system log.
The stdsyslog utility may be passed the following options:
-d
Specify the level for messages on a file descriptor; may (and probably should) be used more than once. If no -d options are specified, stdsyslog will assume ā-d 1:info -d 2:errā, i.e. log the programās standard output using the āinfoā level and the errors using the āerrā one.
-f
Specify the syslog facility to use, or ālistā for a list of the available values. If not specified, stdsyslog will use the ādaemonā facility.
-h
Display program usage information and exit.
-l
List the available syslog levels.
-p
Specify the file to write the child process ID to.
-V
Display program version information and exit.
EXAMPLES
The following examples are shown as given to the shell.
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
logger (1), syslog (3)
TODO
Planned or at least possible enhancements:
*
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. Debian February 8, 2013 STDSYSLOG (1)