Last active
September 26, 2019 20:38
-
-
Save ndvo2710/001b1e7c339ff727a1c6dbb9debabc63 to your computer and use it in GitHub Desktop.
This file contains 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.config | |
import coloredlogs | |
logging.config.dictConfig( | |
{ | |
"version": 1, | |
"disable_existing_loggers": False, | |
"formatters": { | |
"verbose": { | |
"()": "coloredlogs.ColoredFormatter", | |
"format": "[%(asctime)s]:%(levelname)s - " | |
"(%(filename)s --ln%(lineno)s)" | |
"(%(funcName)s) : %(message)s" | |
}, | |
"normal": { | |
"format": "[%(asctime)s]:%(levelname)s - " | |
"(%(filename)s --ln%(lineno)s)" | |
"(%(funcName)s) : %(message)s" | |
}, | |
}, | |
"handlers": { | |
"console": { | |
"level": "DEBUG", | |
"formatter": "verbose", | |
"class": "logging.StreamHandler", | |
"stream": "ext://sys.stdout", | |
}, | |
}, | |
"loggers": { | |
"": { | |
"handlers": ["console"], | |
"level": "DEBUG", | |
"propagate": True, | |
}, | |
"django.request": { | |
"handlers": ["console"], | |
"level": "WARN", | |
"propagate": True, | |
}, | |
"requests.packages.urllib3": { | |
"handlers": ["console"], | |
"level": "WARN", | |
"propagate": True, | |
}, | |
}, | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment