Best way to configure a logger hierarchy (was Re: A new way to configure Python logging)

2009-10-26 Thread Jean-Michel Pichavant
Vinay Sajip wrote: Wolodja Wentland cl.uni-heidelberg.de> writes: -- I usually register a logger 'foo' within the application and one logger for each module in the package, so the resulting logger hierarchy will look like this: foo |__bar |__baz |__n

Re: A new way to configure Python logging

2009-10-25 Thread Vinay Sajip
Wolodja Wentland cl.uni-heidelberg.de> writes: > > You are right, unless handlers (and filters, formatters etc.) are given > > names which can be used to refer to them across multiple configuration > > calls. > > This is something I am thinking about and will probably update PEP 391 > > with my

Re: A new way to configure Python logging

2009-10-25 Thread Wolodja Wentland
On Sun, Oct 25, 2009 at 10:48 +, Vinay Sajip wrote: > Wolodja Wentland cl.uni-heidelberg.de> writes: [ HTMLHandler, multiple configuration files ] OK! I agree that these parts are hard to standardise and do not really belong in the *logging* module. Maybe a kind soul implements a "configura

Re: A new way to configure Python logging

2009-10-25 Thread Vinay Sajip
Wolodja Wentland cl.uni-heidelberg.de> writes: > Could a HTMLHandler be added to the standard set? Preferably one that > leaves the choice of the template engine to the user. I haven't done this precisely because users' requirements will be very different for such a handler. For the same reason,

Re: A new way to configure Python logging

2009-10-24 Thread Wolodja Wentland
On Sat, Oct 24, 2009 at 07:54 +, Vinay Sajip wrote: > Wolodja Wentland cl.uni-heidelberg.de> writes: [snip] > > foo > > |__bar > > |__baz > > |__newt > > |___witch > > > > I set every loggers log level to DEBUG and use the respective logger in > You only need set f

Re: A new way to configure Python logging

2009-10-24 Thread Vinay Sajip
Wolodja Wentland cl.uni-heidelberg.de> writes: > First and foremost: A big *THANK YOU* for creating and maintaining the > logging module. I use it in every single piece of software I create and > am very pleased with it. I'm glad you like it. Thanks for taking the time to write this detailed pos

Re: A new way to configure Python logging

2009-10-23 Thread Wolodja Wentland
On Thu, Oct 22, 2009 at 09:25 +, Vinay Sajip wrote: > I need your feedback to make this feature as useful and as easy to use as > possible. I'm particularly interested in your comments about the dictionary > layout and how incremental logging configuration should work, but all feedback > will

Re: A new way to configure Python logging

2009-10-23 Thread Vinay Sajip
> For my part, I'm configuring the loggers in the application entry point > file, in python code. I'm not sure I am that concerned. However being a > great fan of this module, I kindly support you for any improvements you > may add to this module and appreciate all the work you've already done

Re: A new way to configure Python logging

2009-10-23 Thread Jean-Michel Pichavant
Vinay Sajip wrote: If you use the logging package but don't like using the ConfigParser-based configuration files which it currently supports, keep reading. I'm proposing to provide a new way to configure logging, using a Python dictionary to hold configuration information. It means that you can

A new way to configure Python logging

2009-10-22 Thread Vinay Sajip
If you use the logging package but don't like using the ConfigParser-based configuration files which it currently supports, keep reading. I'm proposing to provide a new way to configure logging, using a Python dictionary to hold configuration information. It means that you can convert a text file s