Created
January 24, 2018 06:03
-
-
Save MattMS/f2e1a5dddddb48cb444973aef6cfb578 to your computer and use it in GitHub Desktop.
List the names of all loggers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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