Strange behavior with os call in cgi script
Duncan Booth
duncan.booth at invalid.invalid
Mon Feb 6 04:46:57 EST 2006
Steve Holden wrote:
>> Add logging to your program:
>> http://www.python.org/doc/2.3.5/lib/module-logging.html
>>
> Probably oiverkill, particularly for a beginner (is it only me that
> thinks the logging module is either way over-complicated or way
> under-documented?).
No, I would agree with you on that. I get the impression that it was
designed by studying some pre-existing logging packages and saying 'what
neat features can we take from each of these' rather than by writing up a
set of use-cases and saying 'what is the simplest way we can make all of
these possible'.
The way it is now means there is quite a step from the simplest possible
use to slightly more complex use. For example, the support for reading
configuration files is wonderfully general purpose, but far too much for
the vast majority of applications: you really don't want to expose a
typical end user to that sort of configuration soup. If all you want in
your application is to let the user specify the name of the logfile and the
logging level you are on your own (and you can't even convert the log level
name from a string to the required number without accessing an _ prefixed
variable in the logging module).
More information about the Python-list
mailing list