Last active
November 19, 2021 01:03
-
-
Save ymollard/1057bbcb005cfe41fa52de51f13e8ec6 to your computer and use it in GitHub Desktop.
Python 3 quick stdout logging
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, sys | |
logging.basicConfig(stream=sys.stderr, level="DEBUG") | |
# Parent module switched to debug for both the logger and the stream handler | |
import logging | |
h = logging.StreamHandler() | |
h.setLevel("DEBUG") | |
l = logging.getLogger("pypot") | |
l.setLevel("DEBUG") | |
l.addHandler(h) | |
import poppy_torso | |
poppy_torso.PoppyTorso() | |
# Get a view of all loggers | |
logging.root.manager.loggerDict | |
https://pypi.org/project/logging_tree/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment