Re: daemon.DaemonContext and logging

2014-05-22 Thread Mark H Harris
On 5/22/14 10:28 AM, wo...@4amlunch.net wrote: On Saturday, April 10, 2010 11:52:41 PM UTC-4, Ben Finney wrote: pid = daemon.pidlockfile.TimeoutPIDLockFile( "/tmp/dizazzo-daemontest.pid", 10) Has pidlockfile been removed? (1.6) -brian "Have you released the inertial dampener?

Re: daemon.DaemonContext

2014-05-22 Thread Ethan Furman
On 05/22/2014 07:31 AM, wo...@4amlunch.net wrote: I know it's 4 years later, but I'm currently battling this myself. I do exactly this and yet it doesn't appear to be keeping the filehandler open. Nothing ever gets written to logs after I daemonize! You didn't include any context (important a

Re: daemon.DaemonContext

2014-05-22 Thread wonko
On Thursday, May 22, 2014 10:31:11 AM UTC-4, wo...@4amlunch.net wrote: > I know it's 4 years later, but I'm currently battling this myself. I do > exactly this and yet it doesn't appear to be keeping the filehandler open. > Nothing ever gets written to logs after I daemonize! Ok, made it work, a

Re: daemon.DaemonContext and logging

2014-05-22 Thread wonko
On Saturday, April 10, 2010 11:52:41 PM UTC-4, Ben Finney wrote: > pid = daemon.pidlockfile.TimeoutPIDLockFile( > "/tmp/dizazzo-daemontest.pid", 10) Has pidlockfile been removed? (1.6) -brian -- https://mail.python.org/mailman/listinfo/python-list

Re: daemon.DaemonContext

2014-05-22 Thread wonko
I know it's 4 years later, but I'm currently battling this myself. I do exactly this and yet it doesn't appear to be keeping the filehandler open. Nothing ever gets written to logs after I daemonize! -- https://mail.python.org/mailman/listinfo/python-list

Re: daemon.DaemonContext and logging

2010-04-10 Thread Ben Finney
Sean DiZazzo writes: > 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: Specifically, it's throwing an e

Re: daemon.DaemonContext

2010-04-08 Thread Ben Finney
Rebelo writes: > i found a crude workaround: > i wrote a function in which i start logging after deamon starts That seems rather sub-optimal; you'll be unable to use the logger for anything before the daemon context opens. This kind of problem is exactly what ‘DaemonContext.files_preserve’ is in

Re: daemon.DaemonContext

2010-04-08 Thread Rebelo
Vinay Sajip wrote: On Apr 8, 1:58 pm, Rebelo wrote: Vinay Sajip wrote: On Apr 8, 1:28 pm, Rebelo wrote: when i use this : context = daemon.DaemonContext(stdin=sys.stdin, stdout=sys.stdout, files_preserve=[fh], signal_map = {signal.SIGTERM: 'terminate',signal.SIGHUP: 'terminate'}) i don't ge

Re: daemon.DaemonContext

2010-04-08 Thread Rebelo
i found a crude workaround: i wrote a function in which i start logging after deamon starts -- http://mail.python.org/mailman/listinfo/python-list

Re: daemon.DaemonContext

2010-04-08 Thread Vinay Sajip
On Apr 8, 1:58 pm, Rebelo wrote: > Vinay Sajip wrote: > > On Apr 8, 1:28 pm, Rebelo wrote: > >> when i use this : > >>  context = daemon.DaemonContext(stdin=sys.stdin, stdout=sys.stdout, > >> files_preserve=[fh], signal_map = {signal.SIGTERM: > >> 'terminate',signal.SIGHUP: 'terminate'}) > > >> i

Re: daemon.DaemonContext

2010-04-08 Thread Rebelo
Vinay Sajip wrote: On Apr 8, 1:28 pm, Rebelo wrote: when i use this : context = daemon.DaemonContext(stdin=sys.stdin, stdout=sys.stdout, files_preserve=[fh], signal_map = {signal.SIGTERM: 'terminate',signal.SIGHUP: 'terminate'}) i don't get error but i still can't write to log file what am i

Re: daemon.DaemonContext

2010-04-08 Thread Vinay Sajip
On Apr 8, 1:28 pm, Rebelo wrote: > when i use this : >  context = daemon.DaemonContext(stdin=sys.stdin, stdout=sys.stdout, > files_preserve=[fh], signal_map = {signal.SIGTERM: > 'terminate',signal.SIGHUP: 'terminate'}) > > i don't get error but i still can't write to log file > what am i doing wro

Re: daemon.DaemonContext

2010-04-08 Thread Vinay Sajip
On Apr 8, 1:28 pm, Rebelo wrote: > when i use this : >  context = daemon.DaemonContext(stdin=sys.stdin, stdout=sys.stdout, > files_preserve=[fh], signal_map = {signal.SIGTERM: > 'terminate',signal.SIGHUP: 'terminate'}) > > i don't get error but i still can't write to log file > what am i doing wro

Re: daemon.DaemonContext

2010-04-08 Thread Rebelo
when i use this : context = daemon.DaemonContext(stdin=sys.stdin, stdout=sys.stdout, files_preserve=[fh], signal_map = {signal.SIGTERM: 'terminate',signal.SIGHUP: 'terminate'}) i don't get error but i still can't write to log file what am i doing wrong? -- http://mail.python.org/mailman/listinfo

Re: daemon.DaemonContext and logging

2009-12-10 Thread Sean DiZazzo
On Dec 10, 5:37 pm, Sean DiZazzo 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 D