Re: improvements for the logging package
Peter Otten <__peter__@web. de> writes:
[color=blue]
> Thomas Heller wrote:
>[color=green][color=darkred]
>>> 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.[/color]
>>
>> Maybe I'm missing something, but the code from the example doesn't work
>> for me:
>>
>>[color=darkred]
>>>>> import logging
>>>>>
>>>>> logging.basicCo nfig(level=logg ing.DEBUG,[/color]
>> ... format='%(ascti me)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)[color=darkred]
>>>>>[/color][/color]
>
> Are you perhaps trying to teach the 2.3 library a trick from the 2.4 docs?[/color]
Yes, it seems so. Although I would have expected the documentation to
inform me about incompatible changes in the api.
Thomas
Peter Otten <__peter__@web. de> writes:
[color=blue]
> Thomas Heller wrote:
>[color=green][color=darkred]
>>> 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.[/color]
>>
>> Maybe I'm missing something, but the code from the example doesn't work
>> for me:
>>
>>[color=darkred]
>>>>> import logging
>>>>>
>>>>> logging.basicCo nfig(level=logg ing.DEBUG,[/color]
>> ... format='%(ascti me)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)[color=darkred]
>>>>>[/color][/color]
>
> Are you perhaps trying to teach the 2.3 library a trick from the 2.4 docs?[/color]
Yes, it seems so. Although I would have expected the documentation to
inform me about incompatible changes in the api.
Thomas
Comment