Strange behavior with os call in cgi script
Rene Pijlman
reply.in.the.newsgroup at my.address.is.invalid
Mon Feb 6 06:33:31 EST 2006
Steve Holden:
>Rene Pijlman:
>> 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?).
It struck me as somewhat complicated as well.
Looking at the basic example:
http://www.python.org/doc/2.3.5/lib/node304.html
... the things that first-time users shouldn't be bothered with IMO are:
1. Getting a logger by name from a hierarchical namespace. There should be
a module-level log function that logs through the root logger.
2. Formatting the message (use a sensible default)
3. Adding a handler to a logger (artefact of the logging system).
4. Setting a log level (use a sensible default).
Perhaps there should be some module-level functions that make it easier to
'just log this message to that file'.
But I do think that adding logging to a cgi script is a sensible thing to
do for a beginner. Getting that to run in a debugger is probably way more
complicated.
--
René Pijlman
More information about the Python-list
mailing list