python logging

Ian Kelly ian.g.kelly at gmail.com
Wed May 18 18:37:52 EDT 2011


2011/5/18 Rafael Durán Castañeda <rafadurancastaneda at gmail.com>:
> Are you using python 2.x or 3.x? At python 2.7 using:
>
> import logging
> logging.getLogger('log').warning('test')
>
> I got:
>
> No handlers could be found for logger "log"

Ah, that's it.  I was using Python 2.5.  Using 2.7 I get the same
result that you do.

Still, it's a surprising change that doesn't seem to be documented as
such.  I'm not sure whether it's a regression or an intentional
change.



More information about the Python-list mailing list