Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
List the names of all loggers.
# Need to import at this level.
# Cannot `from logging.Logger.manager import loggerDict`.
import logging
print(sorted(logging.Logger.manager.loggerDict.keys()))
# https://mail.python.org/pipermail/python-list/2012-June/625343.html
# by Michael Hrivnak
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.