Logging oddity: handlers mandatory in every single logger?

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Feb 3 15:44:29 EST 2010


On Feb 3, 11:36 am, Masklinn <maskl... at masklinn.net> wrote:

Well, Xavier,

I would be the first to agree that the existing logging configuration
API is not ideal. There are a number of reasons for the current
ConfigParser schema used (e.g. an old GUI for configuring logging,
which was there before the logging package was added to Python, but
which was not brought across). However, there is no point in
nitpicking over the particular shortcomings you've focused on, unless
of course you've run out of bikesheds to paint ;-)

Particularly as I've just received the good news from Guido van Rossum
that PEP 391 (Dictionary-Based Configuration For Logging) has been
accepted, and my aim is to get it into Python 2.7 and Python 3.2.

Now, PEP 391 was announced on python-list and python-dev in October
2009, so plenty of people have had an opportunity to comment on it.
Going forwards, and over time, I would hope that this configuration
scheme will supplant the ConfigParser-based approach, and so I don't
think there's much need to tinker with that API.

Onwards, upwards, ever forwards :-)

Regards,

Vinay Sajip



More information about the Python-list mailing list