Re: Using logging module to log into flash drive

2009-06-10 Thread Jorgen Grahn
On Tue, 9 Jun 2009 18:10:18 +0100, A. Cavallo wrote: [top-posting fixed] > On Tuesday 09 June 2009 16:57:00 kretel wrote: >> Hi All, >> >> I am trying to implement the following functionality: >> 1. log messages to the flash drive >> 2. if the flash drive is not available, switch handler to the

Re: Using logging module to log into flash drive

2009-06-10 Thread Krzysztof Retel
On Jun 9, 7:57 pm, Carl Banks wrote: > On Jun 9, 8:57 am, kretel wrote: > > > > > Hi All, > > > I am trying to implement the following functionality: > > 1. log messages to the flash drive > > 2. if the flash drive is not available, switch handler to the > > BufferringHandler and log into buffer,

Re: Using logging module to log into flash drive

2009-06-09 Thread Carl Banks
On Jun 9, 8:57 am, kretel wrote: > Hi All, > > I am trying to implement the following functionality: > 1. log messages to the flash drive > 2. if the flash drive is not available, switch handler to the > BufferringHandler and log into buffer, > 3. once the flash drive is plugged in and available s

Re: Using logging module to log into flash drive

2009-06-09 Thread Krzysztof Retel
> > Anyway there's a TimedRotatingFileHandler handler in the logging package: > > you can derive from it and change the emit/doRollover pair to hold the > > records > > until a device is not ready. > > Hm, that might be the way to go. Will have a try. I had another look at the logging package. Th

Re: Using logging module to log into flash drive

2009-06-09 Thread Krzysztof Retel
On Jun 9, 6:10 pm, "A. Cavallo" wrote: > Hi, > the problem screams for a separate thread. I was thinking about that, as mentioned in the first post. Although, I was wonder if there is another way to tackle the problem. > Anyway there's a TimedRotatingFileHandler handler in the logging package:

Re: Using logging module to log into flash drive

2009-06-09 Thread A. Cavallo
Hi, the problem screams for a separate thread. Anyway there's a TimedRotatingFileHandler handler in the logging package: you can derive from it and change the emit/doRollover pair to hold the records until a device is not ready. Regards, Antonio On Tuesday 09 June 2009 16:57:00 kretel wrote: