Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Python logging insanity
keys = root, foo
handlers = stdout
level = DEBUG
qualname = foo
handlers =
keys = stdout
class = StreamHandler
args = (sys.stdout,)
formatter = mine
keys = mine
format = [%(name)s] %(levelname)s: %(message)s
import logging
import logging.config
one = logging.getLogger('one')
foo = logging.getLogger('foo')
two = logging.getLogger('two')'hello')'world')'bar')
# What do you expect to be printed? Neither 'one' nor 'two' are explicitly mentioned in the .ini file
[two] INFO: world
[foo] INFO: bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.