Re: Making a logging handler that produces context.

2013-01-14 Thread Antoon Pardon
Op 14-01-13 13:38, Peter Otten schreef: > It turns out the logic of the above is correct. The problem is that the > handler has to see the INFO-level records while the filter() method has to > reject them. The following configuration seems to achieve that: I see, I thought trowing away logrecord

Re: Making a logging handler that produces context.

2013-01-14 Thread Peter Otten
Antoon Pardon wrote: > I have some in house code for which I am considering replacing the > logging code with something that uses the logging module. > However there is one thing the in-house log code does, that seems > difficult to do with the logging module, provide some context. The > in-hous

Making a logging handler that produces context.

2013-01-14 Thread Antoon Pardon
I have some in house code for which I am considering replacing the logging code with something that uses the logging module. The code is typically used as a cron job with everything higher than info logged to a file and everything higher than warning logged to stderr. However there is one thing