[Python-Dev] Consistent logging in the standard library

Arsalan Zaidi azaidi at vsnl.com
Wed Sep 17 18:11:35 EDT 2003


Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
> I'd like to propose that some portion of the namespace be reserved
> for use by logging in the standard library. If acceptable, all that
> would need to be done would be to update the documentation to
> indicate the namespace reservation. The actual use of the namespace
> could be implemented as and when each module is changed to use the
> logging module.
>
> The scheme of having all standard library logging under one umbrella
> allows applications to be configured so that all library-level
> messages can be routed to specific handlers, filtered simply at one
> point, etc.

I agree with this and was infact about to propose this to Matthew Barnes a
short while ago. Good thing I read the list first. :-)

> My preference for namespace reservation is that any logger name
> beginning with "python." should be reserved for use by the standard
> distribution. I think that each module should use an eponymous
> logging channel name rooted in the hierarchy for the Python library -
> e.g. asyncore would use "python.asyncore", etc.
>
> Matthew Barnes, who kicked off the original thread, prefers "stdlib"
> as the prefix to use, rather than "python".

No strong preference either way, but if someone were to hold a gun to my
head, I'd scream... And then express my preference for 'python' as the root.
But that's just the Java talking :-)

--Arsalan




More information about the Python-Dev mailing list