8 loggerexec - Run a command and send STDOUT and STDERR to syslog
12 loggerexec [-s] I<FACILITY> I<IDENT> I<COMMAND> [I<ARGS>]
14 Send I<COMMAND>'s stdout and stderr to syslog.
15 I<FACILITY> is one of standard syslog facility names (user, mail, daemon, auth, local0, ...).
16 I<IDENT> is a freely choosen identity name, also known as tag or programname.
17 I<COMMAND>'s stdout goes as B<info> log level, stderr goes as B<error> log level.
18 Option C<-s> puts the output on stdout/stderr too.
22 logger(1), stdsyslog(1)
29 if [ ".$1" = ".--help" ]
35 declare -a logger_opts
=()
52 exec "$@" > >(exec logger
-p "$facility.info" -t "$ident" "${logger_opts[@]}" 2>&1) 2> >(exec logger
-p "$facility.error" -t "$ident" "${logger_opts[@]}")