Created
August 7, 2024 08:00
-
-
Save kism/98a64298c789243cd26d97797f50fc42 to your computer and use it in GitHub Desktop.
This is silly I think
This file contains hidden or 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
import logging | |
loggers = [logging.getLogger(name) for name in logging.root.manager.loggerDict] | |
for logger in loggers: | |
if "my_logger" in logger.name or "TEMP_TEST_LOGGER" in logger.name: | |
logging.root.manager.loggerDict.pop(logger.name) | |
loggers = [logging.getLogger(name) for name in logging.root.manager.loggerDict] | |
for logger in loggers: | |
logging.critical(logger.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment