crafty-4/app/config/logging.json

74 lines
1.9 KiB
JSON
Raw Normal View History

2020-08-12 00:36:09 +00:00
{
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"commander": {
2020-08-23 22:43:28 +00:00
"format": "%(asctime)s - [Crafty] - %(levelname)-8s - %(name)s - %(message)s"
},
"tornado_access": {
"format": "%(asctime)s - [Tornado] - [Access] - %(levelname)s - %(message)s"
},
"schedule": {
"format": "%(asctime)s - [Schedules] - %(levelname)s - %(message)s"
2020-08-12 00:36:09 +00:00
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"formatter": "commander",
"stream": "ext://sys.stdout"
},
"main_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"formatter": "commander",
"filename": "logs/commander.log",
2020-08-12 00:36:09 +00:00
"maxBytes": 5242880,
"backupCount": 20,
"encoding": "utf8"
},
"session_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"formatter": "commander",
"filename": "logs/session.log",
2020-08-12 00:36:09 +00:00
"backupCount": 0,
"encoding": "utf8"
2020-08-23 22:43:28 +00:00
},
"tornado_access_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"formatter": "tornado_access",
"filename": "logs/tornado-access.log",
"maxBytes": 10485760,
"backupCount": 20,
"encoding": "utf8"
},
"schedule_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"formatter": "schedule",
"filename": "logs/schedule.log",
"maxBytes": 10485760,
"backupCount": 20,
"encoding": "utf8"
2020-08-12 00:36:09 +00:00
}
},
"loggers": {
"": {
"level": "INFO",
"handlers": ["main_file_handler", "session_file_handler"],
"propagate": false
2020-08-23 22:43:28 +00:00
},
"tornado.access": {
"level": "INFO",
"handlers": ["tornado_access_file_handler"],
"propagate": false
},
"schedule": {
"level": "INFO",
"handlers": ["schedule_file_handler"],
"propagate": false
2020-08-12 00:36:09 +00:00
}
}
}