daemonize icon indicating copy to clipboard operation
daemonize copied to clipboard

in foreground mode, logging is still done to the syslog

Open whot opened this issue 8 years ago • 0 comments

This is as of commit 9018be

By default, daemonize inits a logger to syslog, catches any exceptions and writes them to that logger. That's useful in daemon mode but it also does so when in foreground mode - with the odd behaviour that anything the application prints normally ends up on stdout/stderr but any exception is only printed to syslog. This makes debugging harder and is quite confusing to those that expect an exception.

IMO the behaviour for the logger should either be if self.logger is None and not self.foreground or the propagation should be to stdout/stderr as well in foreground mode.

whot avatar Nov 06 '17 01:11 whot