Message189326
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.") |
|
Date |
User |
Action |
Args |
2013-05-15 23:37:26 | joshpurvis | set | recipients:
+ joshpurvis, vinay.sajip, Julien.Palard |
2013-05-15 23:37:26 | joshpurvis | set | messageid: <1368661046.28.0.0153156142734.issue17981@psf.upfronthosting.co.za> |
2013-05-15 23:37:26 | joshpurvis | link | issue17981 messages |
2013-05-15 23:37:26 | joshpurvis | create | |
|