Skip to content

Instantly share code, notes, and snippets.

@ymollard
Last active November 19, 2021 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymollard/1057bbcb005cfe41fa52de51f13e8ec6 to your computer and use it in GitHub Desktop.
Save ymollard/1057bbcb005cfe41fa52de51f13e8ec6 to your computer and use it in GitHub Desktop.
Python 3 quick stdout logging
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