Created
April 16, 2019 07:37
-
-
Save ahyt910/4252d26a4c244e84556ca2a1fd1287a0 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
{ | |
"version": 1, | |
"disable_existing_loggers": false, | |
"root": { | |
"level": "DEBUG", | |
"handlers": [ | |
"consoleHandler", | |
"logFileHandler" | |
] | |
}, | |
"handlers": { | |
"consoleHandler": { | |
"class": "logging.StreamHandler", | |
"level": "INFO", | |
"formatter": "consoleFormatter", | |
"stream": "ext://sys.stdout" | |
}, | |
"logFileHandler": { | |
"class": "logging.FileHandler", | |
"level": "DEBUG", | |
"formatter": "logFileFormatter", | |
"filename": "./log/app.log", | |
"mode": "w", | |
"encoding": "utf-8" | |
} | |
}, | |
"formatters": { | |
"consoleFormatter": { | |
"format": "[%(levelname)-8s]%(funcName)s - %(message)s" | |
}, | |
"logFileFormatter": { | |
"format": "%(asctime)s|%(levelname)-8s|%(name)s|%(funcName)s|%(message)s" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment