On Wed, Dec 31, 2014 at 8:24 AM, Tim Chase <python.l...@tim.thechases.com> wrote: > While it may involve reaching into the objects may or may not be > blessed, the following seems to work for me in Py2.7: > > >>> import logging > >>> # add a bunch of loggers and sub-loggers > >>> print logging.Logger.manager.loggerDict.keys()
Works in 3.5, too, aside from trivialities: $ python3 Python 3.5.0a0 (default:1c51f1650c42+, Dec 29 2014, 02:29:06) [GCC 4.7.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import logging >>> logging.getLogger("Name") <logging.Logger object at 0x7f8dcc339be0> >>> logging.getLogger("name.sublogger") <logging.Logger object at 0x7f8dcc339ba8> >>> logging.Logger.manager.loggerDict {'name.sublogger': <logging.Logger object at 0x7f8dcc339ba8>, 'Name': <logging.Logger object at 0x7f8dcc339be0>, 'name': <logging.PlaceHolder object at 0x7f8dcc33ebe0>} I'd say this is fine for debugging with. ChrisA -- https://mail.python.org/mailman/listinfo/python-list