Add a basic log config file

This commit is contained in:
louis chauvet 2018-08-11 01:44:27 +02:00
parent 75c18b9bb3
commit 756900cba9

59
log_config.json Normal file
View File

@ -0,0 +1,59 @@
{
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"simple": {
"format": "%(asctime)s :: %(name)s :: %(levelname)s :: %(message)s"
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"level": "DEBUG",
"formatter": "simple",
"stream": "ext://sys.stdout"
},
"info_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"level": "INFO",
"formatter": "simple",
"filename": "info.log",
"maxBytes": 10485760,
"backupCount": 20,
"encoding": "utf8"
},
"error_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"level": "ERROR",
"formatter": "simple",
"filename": "errors.log",
"maxBytes": 10485760,
"backupCount": 20,
"encoding": "utf8"
},
"sms_handler": {
"class":"SMSHandler.SMSHandler",
"level":"ERROR",
"formatter": "simple"
}
},
"loggers": {
"foBot": {
"level": "DEBUG",
"handlers": ["console", "info_file_handler", "error_file_handler", "sms_handler"]
},
"discord": {
"level":"WARNING",
"handlers":["console","error_file_handler"]
}
},
"root": {
"level": "INFO",
"handlers": ["console", "info_file_handler", "error_file_handler"]
}
}