[Python-Dev] Consistent logging in the standard library (original) (raw)
Arsalan Zaidi azaidi at vsnl.com
Wed Sep 17 18:14:18 EDT 2003
- Previous message: [Python-Dev] Consistent logging in the standard library
- Next message: [Python-Dev] Improving the CGI module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 :-)
Someone proposed an '_'. I don't know. My gut feeling is that it's too cryptic and Perl like. If you must have something, call it 'base' or 'python' or even 'stdlib'. But what do I know...
--Arsalan
- Previous message: [Python-Dev] Consistent logging in the standard library
- Next message: [Python-Dev] Improving the CGI module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]