python logging

Rafael Durán Castañeda rafadurancastaneda at gmail.com
Wed May 18 18:01:03 EDT 2011


On 18/05/11 23:29, Ian Kelly wrote:
> 2011/5/18 Rafael Durán Castañeda<rafadurancastaneda at gmail.com>:
>> That's not exactly how it works. You can use logging without any
>> configuration and the default output will be console. In addition default
>> logging level is warning, so:
>>
>> logging.info("Some text")
>>
>> won't  show anything and
>>
>> logging.warning("Other text")
>>
>> will show:
>>
>> WARNING:root:Other text
>>
>> Please check the link I gave before.
>>
>> Bye
> Odd.  That seems to work, but it contradicts the documentation at:
>
> http://docs.python.org/howto/logging.html#what-happens-if-no-configuration-is-provided
I think you are confuse because of you are looking at advanced logging, 
where getLogger is being used. Simple logging works without any 
configuration, getLogger doesn't.



More information about the Python-list mailing list