dynamically getting loggers

belred belred at gmail.com
Thu Aug 14 17:29:41 EDT 2008


is there a way to dynamically get all the active loggers?

i currently have code like this in different areas of the program:

import logging
log = logging.getLogger('foo')


i would like to write a function that dynamically get a list of all
the logger names such as 'foo'.  or get a list of the loggers which i
could then get the names.  is this even possible?  i don't see a
logger function that returns loggers.

thanks,

bryan






More information about the Python-list mailing list