[Python-Dev] Using logging in the stdlib and its unit tests

Brett Cannon brett at python.org
Sat Dec 11 20:32:55 CET 2010


On Fri, Dec 10, 2010 at 22:21, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
> Nick Coghlan <ncoghlan <at> gmail.com> writes:
>
>
>> This could actually make a reasonably good basic for a "task oriented"
>> subsection of the logging documentation. Something like:
>>
>
> Good suggestion, I'll see what I can do.

Just wanted to +1 on some task-oriented (or at least simple intro)
docs going into the logging module.

The length of the docs is rather daunting I always have a hard time
getting started (the first example is for file logging and the second
one does log rotation when all I want is printing to stderr!). All I
want is an opener saying, "here are the functions to call to send
stuff to the log; the defaults for each go here and here (e.g.,
stderr, /dev/null), and if you want to change those settings, here is
how to e.g., get info() to go to stderr. Read on for more if you need
something fancier (e.g., writing to a file)". That and making it not
an error when I call logging.error() w/o setting an explicit logger
would go a long way to making the logging module much more accessible
IMO.


More information about the Python-Dev mailing list