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 se

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 within

Re: Logging help

2009-01-25 Thread Aahz
In article , koranthala 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) <*> http://www.pythoncraft.com/ Weinberg's Second Law: If builders built bui

Re: Logging help

2009-01-22 Thread koranthala
On Jan 22, 10:25 pm, Vinay Sajip wrote: > On Jan 22, 3:40 pm,koranthala 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 fi

Re: Logging help

2009-01-22 Thread Vinay Sajip
On Jan 22, 3:40 pm, koranthala 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 FileHandler takes up

Re: Logging help

2009-01-22 Thread koranthala
On Jan 22, 2:14 pm, Vinay Sajip wrote: > On Jan 22, 6:49 am,koranthala 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 tr

Re: Logging help

2009-01-22 Thread Vinay Sajip
On Jan 22, 6:49 am, koranthala 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 > mention that X fai

Re: Logging help

2009-01-21 Thread koranthala
On Jan 21, 2:55 pm, Vinay Sajip wrote: > On Jan 20, 10:11 am,koranthala 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

Re: Logging help

2009-01-21 Thread Vinay Sajip
On Jan 20, 10:11 am, koranthala 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 one, why would it b

Re: Logging help

2009-01-20 Thread Gabriel Genellina
En Tue, 20 Jan 2009 08:11:52 -0200, koranthala escribió: On Jan 20, 5:45 am, Chris Rebert wrote: On Mon, Jan 19, 2009 at 11:36 AM, koranthala wrote: >   Is it possible somehow to have the logging module rotate the files > every time I start it. >   Basically, I can automatically rotate u

Re: Logging help

2009-01-20 Thread Gabriel Genellina
En Tue, 20 Jan 2009 08:11:52 -0200, koranthala escribió: On Jan 20, 5:45 am, Chris Rebert wrote: On Mon, Jan 19, 2009 at 11:36 AM, koranthala wrote: >   Is it possible somehow to have the logging module rotate the files > every time I start it. >   Basically, I can automatically rotate u

Re: Logging help

2009-01-20 Thread koranthala
On Jan 20, 5:45 am, Chris Rebert wrote: > On Mon, Jan 19, 2009 at 11:36 AM, koranthala 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 rotate

Re: Logging help

2009-01-19 Thread Chris Rebert
On Mon, Jan 19, 2009 at 11:36 AM, koranthala 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. Just call the