daemonize
daemonize copied to clipboard
in foreground mode, logging is still done to the syslog
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.