On 19/05/11 00:10, Ian Kelly wrote:
2011/5/18 Rafael Durán Castañeda<rafadurancastan...@gmail.com>:
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.
It seems to work without any configuration just as well as the root logger:

import logging
logging.getLogger('foo').warning('test')
WARNING:foo:test

Or am I misunderstanding you?
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"


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to