Skip to content

Instantly share code, notes, and snippets.

@thewisenerd
Created February 25, 2024 18:17
Show Gist options
  • Save thewisenerd/c9003b9b237f2a5977392d00e3fb33f5 to your computer and use it in GitHub Desktop.
Save thewisenerd/c9003b9b237f2a5977392d00e3fb33f5 to your computer and use it in GitHub Desktop.
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
logging.basicConfig(
handlers=[ch],
level=logging.ERROR,
format='%(levelname)-8s [%(asctime)s.%(msecs)03d] %(name)s: %(message)s',
datefmt='%Y-%m-%d %H:%M:%S'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment