Re: python logging module and custom handler specified in config file

2007-10-19 Thread Vinay Sajip
On 19 Oct, 12:04, Frank Aune <[EMAIL PROTECTED]> wrote: > On Thursday 18 October 2007 19:26:59 Vinay Sajip wrote: > > What if you want to datestamp filenames for filehandlers, say with todays date > for example? > > [handler_file] > class=FileHandler > level=NOTSET > formatter=normal > args=('filen

Re: python logging module and custom handler specified in config file

2007-10-19 Thread Frank Aune
On Thursday 18 October 2007 19:26:59 Vinay Sajip wrote: > The values in the config file are interpreted in the context of the > logging module's namespace. Hence, one way of achieving what you want > is putting any custom handlers in > a module of your own, and providing a binding in the logging mo

Re: python logging module and custom handler specified in config file

2007-10-18 Thread Frank Aune
On Thursday 18 October 2007 19:26:59 Vinay Sajip wrote: > The same technique applies to the arguments passed to the constructor. > > Hope this helps, > Thank you! This seems like exactly what I was looking for. Very impressive logging framework btw - I use it whenever I can =) Cheers, Frank --

Re: python logging module and custom handler specified in config file

2007-10-18 Thread Vinay Sajip
On 15 Oct, 15:15, Frank Aune <[EMAIL PROTECTED]> wrote: > What I'm wondering, is if its possible to specify the database handler in a > config file like: > > [handler_database] > class=DBHandler > level=DEBUG > formatter=database > args=('localhost', uid='root') > > I've seen the log_test14.py exam

python logging module and custom handler specified in config file

2007-10-15 Thread Frank Aune
Hello, I've been playing with the python logging module lately, and I manage to log to both stderr and MySQL database. What I'm wondering, is if its possible to specify the database handler in a config file like: [handler_database] class=DBHandler level=DEBUG formatter=database args=('localho