Skip to content

Instantly share code, notes, and snippets.

@roshane
Created March 5, 2022 09:42
Show Gist options
  • Save roshane/0aa888582a675608e0119378a324f2e1 to your computer and use it in GitHub Desktop.
Save roshane/0aa888582a675608e0119378a324f2e1 to your computer and use it in GitHub Desktop.
python std out logger
import logging
import sys
log_format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG, format=log_format)
def get_logger(name):
return logging.getLogger(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment