Created
November 2, 2018 01:38
-
-
Save kevenli/24640b5fe993538ffe833e466a093af8 to your computer and use it in GitHub Desktop.
python logging conf file
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
[loggers] | |
keys=root,access | |
[handlers] | |
keys=consoleHandler,errorFileHandler,accessFileHandler,infoFileHandler | |
[formatters] | |
keys=simpleFormatter, accessFormatter | |
[logger_root] | |
level=INFO | |
handlers=consoleHandler,errorFileHandler,infoFileHandler | |
[logger_access] | |
level=INFO | |
handlers=accessFileHandler | |
qualname=tornado.access | |
propagate=0 | |
[handler_consoleHandler] | |
class=StreamHandler | |
level=DEBUG | |
formatter=simpleFormatter | |
args=(sys.stdout,) | |
[handler_errorFileHandler] | |
class=handlers.TimedRotatingFileHandler | |
level=ERROR | |
formatter=simpleFormatter | |
args=('log/error.log','midnight') | |
[handler_accessFileHandler] | |
class=handlers.TimedRotatingFileHandler | |
level=INFO | |
formatter=accessFormatter | |
args=('log/access.log','midnight') | |
[handler_infoFileHandler] | |
class=handlers.TimedRotatingFileHandler | |
level=INFO | |
formatter=simpleFormatter | |
args=('log/info.log','midnight') | |
[formatter_simpleFormatter] | |
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s | |
datefmt= | |
[formatter_accessFormatter] | |
format=%(asctime)s - %(message)s | |
datefmt= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment