Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5753
| References | (4 earlier) <BANLkTi=faomiasrShV_Eho67etiF_b7H8Q@mail.gmail.com> <4DD4419F.5080400@gmail.com> <BANLkTi=J1R3jmJ65KeP++UMXeZr2WLYwxg@mail.gmail.com> <4DD44684.1080504@gmail.com> <BANLkTi=mOh4DrNqqoo61j0-JfGT0cMPy5w@mail.gmail.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2011-05-18 16:42 -0600 |
| Subject | Re: python logging |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1781.1305758558.9059.python-list@python.org> (permalink) |
2011/5/18 Ian Kelly <ian.g.kelly@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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
python logging Fei <mail2fei@gmail.com> - 2011-05-17 13:55 -0700
Re: python logging Rafael Durán Castañeda <rafadurancastaneda@gmail.com> - 2011-05-18 00:00 +0200
Re: python logging Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-17 16:55 -0600
Re: python logging Fei <mail2fei@gmail.com> - 2011-05-17 18:09 -0700
Re: python logging Rafael Durán Castañeda <rafadurancastaneda@gmail.com> - 2011-05-18 21:42 +0200
Re: python logging Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-18 15:29 -0600
Re: python logging Rafael Durán Castañeda <rafadurancastaneda@gmail.com> - 2011-05-19 00:01 +0200
Re: python logging Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-18 16:10 -0600
Re: python logging Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2011-05-18 15:27 -0700
Re: python logging Rafael Durán Castañeda <rafadurancastaneda@gmail.com> - 2011-05-19 00:21 +0200
Re: python logging Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-18 16:37 -0600
Re: python logging Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-18 16:42 -0600
Re: python logging Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2011-05-19 02:27 -0700
csiph-web