[Python-Dev] Re: PEP 282 comments (original) (raw)
Matthias Urlichs smurf@noris.de
Fri, 22 Mar 2002 20:21:29 +0100
- Previous message: [Python-Dev] Re: PEP 282 comments
- Next message: [Python-Dev] Re: PEP 282 comments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
Tim Peters:
It seems that having a logger module at all is a YAGNI for 99% of users 99% of the time. That suggests that, if it's a good idea to have one anyway, it should cater to the 1% of users who need it 1% of the time. This
I disagree.
How many programs write to stderr with some undefined stuff which is either too much or not enough information? Probably lots.
The next user then wants to use that same program as a daemon and needs to figure out how to get the stuff to Syslog safely.
The next one wants to use it as a module, link it into HTTP and needs to figure out how to package some of the text into an HTML error message.
Thus, my take is that as soon as you have a sensible system to do logging with, far more than the 1% of people who "need logging" now will adapt to it.
makes me uncomfortable about rejecting requirements from people who actually use logging heavily.
I'd make the simple stuff easy and the complicated stuff possible. This approach suggests that the PEP in its current form is too complicated:
Formatters are associated with handlers -- it makes no sense to XML-format a Syslog message, and the default is going to be "msg % args" anyway.
Filters are handlers which don't print anything. Instead, they throw a StopLogging exception.
Thoughts?
-- Matthias Urlichs | noris network AG | http://smurf.noris.de/
The price of success in philosophy is triviality. -- C. Glymour.
- Previous message: [Python-Dev] Re: PEP 282 comments
- Next message: [Python-Dev] Re: PEP 282 comments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]