python logging
Rafael Durán Castañeda
rafadurancastaneda at gmail.com
Thu May 19 03:18:11 EDT 2011
More information about the Python-list mailing list
Thu May 19 03:18:11 EDT 2011
- Previous message (by thread): python logging
- Next message (by thread): python logging
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.kelly at gmail.com> escribió: > 2011/5/18 Ian Kelly <ian.g.kelly at 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. > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20110519/f603e3f8/attachment-0001.html>
- Previous message (by thread): python logging
- Next message (by thread): python logging
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list