Re: logging and daemons

2009-02-16 Thread Fernando M. Maresca
On Mon, Feb 16, 2009 at 10:11:51AM -0800, Scott David Daniels wrote: > Fernando M. Maresca wrote: > On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: >>> You can actually set sys.std[err|out] to your ?file? descriptor of >>> choice in python >> Yes, but I'm trying to use *TimedR

Re: logging and daemons

2009-02-16 Thread Scott David Daniels
Fernando M. Maresca wrote: On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: You can actually set sys.std[err|out] to your ?file? descriptor of choice in python Yes, but I'm trying to use *TimedRotating*FileHandler, which makes the fd of the logfile change in every rotation o

Re: logging and daemons

2009-02-16 Thread Vinay Sajip
On Feb 16, 1:15 pm, "Fernando M. Maresca" wrote: > Yes, but I'm trying to use *TimedRotating*FileHandler, which makes the > fd of the logfile change in every rotation of the logfile. So the direct > approach of std[out|err] redirection to the logfile fd obtained from > the logger instance is unusa

Re: logging and daemons

2009-02-16 Thread Diez B. Roggisch
Fernando M. Maresca schrieb: Hello. I'm in the process of replacing a custom logger class in one of my apps that has several daemons. In the last step of daemonizing a program, after closing fds, stderr and stdout are redirected to the logfile of the program. Now, I'm trying to use TimedRotatin

Re: logging and daemons

2009-02-16 Thread Neal Becker
Garrett Cooper wrote: > On Mon, Feb 16, 2009 at 5:15 AM, Fernando M. Maresca > wrote: >> Hello, thanks for the answer. >> >> On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: >>> You can actually set sys.std[err|out] to your ?file? descriptor of >>> choice in python (it has to have

Re: logging and daemons

2009-02-16 Thread Garrett Cooper
On Mon, Feb 16, 2009 at 5:15 AM, Fernando M. Maresca wrote: > Hello, thanks for the answer. > > On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: >> You can actually set sys.std[err|out] to your ?file? descriptor of >> choice in python (it has to have read, write, and flush methods,

Re: logging and daemons

2009-02-16 Thread Fernando M. Maresca
Hello, thanks for the answer. On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: > You can actually set sys.std[err|out] to your ?file? descriptor of > choice in python (it has to have read, write, and flush methods, IIRC > to function). The only thing is (like all things dealing with

Re: logging and daemons

2009-02-16 Thread Garrett Cooper
On Mon, Feb 16, 2009 at 5:02 AM, Fernando M. Maresca wrote: > > Hello. > > I'm in the process of replacing a custom logger class in one of my apps > that has several daemons. In the last step of daemonizing a program, > after closing fds, stderr and stdout are redirected to the logfile of > the pr