[issue14539] logging module: logger does not print log message with logging.INFO level
report at bugs.python.org
Tue Apr 10 09:34:00 CEST 2012
Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:
You haven't configured any handlers for the logger, so by default it wouldn't actually log anything. However, when no handlers are configured, logging uses an internal "last resort" handler to print the message to sys.stderr, and this handler has a threshold of WARNING (it's meant to print stdlib warnings and errors when no handlers are configured by an application).
If you add the lines, you should see something like this:
>>> logging.basicConfig(level=logging.INFO, format='%(message)s')
>>> logging.info('info message')
for more information.
assignee: -> vinay.sajip
resolution: -> invalid
status: open -> closed
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list