Josh Purvis added the comment:

Ironically, I ran into this same exact issue today, and I have investigated the 
`files_preserve` param, with no luck. I'm not too familiar with the internals 
here, but from what I can tell it works with FileHandler, but not the 
SysLogHandler. 

If you try to add the syslog handler to the files_preserve list it has no 
effect. It seems to need a stream, and SysLogHandler doesn't have the stream 
attribute.

# This works for FileHandler's
log = logging.getLogger('MyLog')
fh = logging.FileHandler('/some/file')

with daemon.DaemonContext(files_preserve=[fh.stream, ]):
   log.warn("In the belly of the beast.")

----------
status: pending -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17981>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to