Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Redirect STDOUT and STDERR into syslog, using "logger", and bash process substitution
# Redirect STDOUT/STDERR into syslog
exec > >(logger -p 2> >(logger -p user.warn)

shribe commented Apr 13, 2015

Nice example. It helped me figure out what I wanted to do about logging from scripts used with launchd on OS X:

mpdude commented May 11, 2016

Is that for bash only or does it work in sh as well?

spieden commented Mar 24, 2017

@shribe Thank you! Exactly what I needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment