RE: Logging help

2013-08-04 Thread Joseph L. Casale
Oh hai - as I was reading the documentation, look what I found: http://docs.python.org/2/library/logging.html#filter Methinks that should do exactly what you want. Hi Wayne, I was too hasty when I looked at filters as I didn't think they could do what I wanted. Turns out a logging object sent

Re: Logging help

2013-08-03 Thread Wayne Werner
On Thu, 1 Aug 2013, Joseph L. Casale wrote: I have a couple handlers applied to a logger for a file and console destination. Default levels have been set for each, INFO+ to console and anything to file. How does one prevent logging.exception from going to a specific handler when it falls

Re: Logging help

2009-01-25 Thread Aahz
In article f4fc590c-f31d-46be-b769-9d746b8b8...@w39g2000prb.googlegroups.com, koranthala koranth...@gmail.com wrote: Is it possible somehow to have the logging module rotate the files every time I start it. If you're on Linux, why not use logrotate? -- Aahz (a...@pythoncraft.com) *

Re: Logging help

2009-01-22 Thread Vinay Sajip
On Jan 22, 6:49 am, koranthala koranth...@gmail.com wrote: I understand Vinay. But my point is that I wanted a mechanism to rotate the log files based on data - i.e. today one log, tomorrow Did you mean based on date? another. This is easier because when trouble tickets are raised, users

Re: Logging help

2009-01-22 Thread koranthala
On Jan 22, 2:14 pm, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On Jan 22, 6:49 am,koranthalakoranth...@gmail.com wrote: I understand Vinay. But my point is that I wanted a mechanism to rotate the log files based on data - i.e. today one log, tomorrow Did you mean based on date? another.

Re: Logging help

2009-01-22 Thread Vinay Sajip
On Jan 22, 3:40 pm, koranthala koranth...@gmail.com wrote: Thank you very much Vinay. You have been extremely helpful. This was my first design - but then I found that log system was taking up quite a huge chunk of the memory. That is why I went to rotating file handler. Using just plain

Re: Logging help

2009-01-22 Thread koranthala
On Jan 22, 10:25 pm, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On Jan 22, 3:40 pm,koranthalakoranth...@gmail.com wrote: Thank you very much Vinay. You have been extremely helpful. This was my first design - but then I found that log system was taking up quite a huge chunk of the memory.

Re: Logging help

2009-01-21 Thread Vinay Sajip
On Jan 20, 10:11 am, koranthala koranth...@gmail.com wrote: The doRollover method does not append to the earlier file. Rather, it creates a new file with the same name. Err... that's what rollover means - switching to a new log file (and renaming the old ones). If it just appended to the old

Re: Logging help

2009-01-21 Thread koranthala
On Jan 21, 2:55 pm, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On Jan 20, 10:11 am,koranthalakoranth...@gmail.com wrote: The doRollover method does not append to the earlier file. Rather, it creates a new file with the same name. Err... that's what rollover means - switching to a new log

Re: Logging help

2009-01-20 Thread koranthala
On Jan 20, 5:45 am, Chris Rebert c...@rebertia.com wrote: On Mon, Jan 19, 2009 at 11:36 AM, koranthala koranth...@gmail.com wrote: Hi,   Is it possible somehow to have the logging module rotate the files every time I start it.   Basically, I can automatically rotate using

Re: Logging help

2009-01-20 Thread Gabriel Genellina
En Tue, 20 Jan 2009 08:11:52 -0200, koranthala koranth...@gmail.com escribió: On Jan 20, 5:45 am, Chris Rebert c...@rebertia.com wrote: On Mon, Jan 19, 2009 at 11:36 AM, koranthala koranth...@gmail.com wrote:   Is it possible somehow to have the logging module rotate the files every time

Re: Logging help

2009-01-19 Thread Chris Rebert
On Mon, Jan 19, 2009 at 11:36 AM, koranthala koranth...@gmail.com wrote: Hi, Is it possible somehow to have the logging module rotate the files every time I start it. Basically, I can automatically rotate using RotatingFileHandler; Now I want it rotated every time I start the program too.