improvements for the logging package

Thomas Heller theller at python.net
Tue Sep 13 09:40:32 CEST 2005


"Vinay Sajip" <vinay_sajip at yahoo.co.uk> writes:

> OK, it's not right at the top of the docs, but the example at
>
> http://docs.python.org/lib/minimal-example.html
>
> has been there for a while, and if you think it can be made clearer,
> please suggest how.

Maybe I'm missing something, but the code from the example doesn't work
for me:


>>> import logging
>>>
>>> logging.basicConfig(level=logging.DEBUG,
...                     format='%(asctime)s %(levelname)s %(message)s',
...                     filename='/tmp/myapp.log',
...                     filemode='w')
Traceback (most recent call last):
  File "<stdin>", line 4, in ?
TypeError: basicConfig() takes no arguments (4 given)
>>>



More information about the Python-list mailing list