Skip to content

Instantly share code, notes, and snippets.

@kdheepak kdheepak/log.py
Created Sep 19, 2018

Embed
What would you like to do?
import logging
log_format = (
"%(asctime)s - %(levelname)s [%(filename)s:%(lineno)d] : %(message)s"
)
logger = logging.getLogger(__name__)
s = logging.StreamHandler()
f = logging.Formatter(log_format)
s.setFormatter(f)
logger.addHandler(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.