daemon.DaemonContext and logging
Sean DiZazzo
half.italian at gmail.com
Thu Dec 10 23:21:18 EST 2009
On Dec 10, 5:37 pm, Sean DiZazzo <half.ital... at gmail.com> wrote:
> I'm finally getting around to trying out the python-daemon module and
> have hit a wall. I'm trying to set up logging inside of the "with
> daemon.DaemonContext" block. But when I try to use a logger inside
> the block it throws an error:
Got it! The DaemonContext closes all open file descriptors, including
the one inside the logging handler. I got it to work by passing the
logger's file handle in with the "preserve_files" option.
~Sean
More information about the Python-list
mailing list