You are right that behavior isn't documented and might be a bug. You could report it.
Bye El 19 de mayo de 2011 00:42, Ian Kelly <ian.g.ke...@gmail.com> escribió: > 2011/5/18 Ian Kelly <ian.g.ke...@gmail.com>: > > 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. > > I was wrong, it's more complicated than that. > > Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import logging > >>> logging.getLogger('log').warning('test') > No handlers could be found for logger "log" > >>> logging.warning('test') > WARNING:root:test > >>> logging.getLogger('log').warning('test') > WARNING:log:test > > Apparently, getLogger() is unconfigured by default, but if you just > use the root logger once, then they magically get configured. >
-- http://mail.python.org/mailman/listinfo/python-list