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" ]
52 exec "$@" > >(exec {fd
}>&1; exec tee ${passthrough:+/dev/fd/$fd} |
exec logger
-p "$facility.info" -t "$ident" 2>&1) 2> >(exec tee ${passthrough:+/dev/stderr} | logger
-p "$facility.error" -t "$ident")