make logging configurable; add logging to syslog