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"
|
2020-08-31 15:29:32 +00:00
|
|
|
},
|
2021-08-10 20:17:56 +00:00
|
|
|
"schedule": {
|
2020-08-31 15:29:32 +00:00
|
|
|
"format": "%(asctime)s - [Schedules] - %(levelname)s - %(message)s"
|
2023-11-05 18:26:27 +00:00
|
|
|
},
|
|
|
|
"auth": {
|
|
|
|
"format": "%(asctime)s - [AUTH] - %(levelname)s - %(message)s"
|
2023-12-07 23:02:54 +00:00
|
|
|
},
|
2024-04-17 22:03:10 +00:00
|
|
|
"audit": {
|
|
|
|
"()": "app.classes.logging.log_formatter.JsonFormatter"
|
|
|
|
},
|
2023-12-07 23:02:54 +00:00
|
|
|
"cmd_queue": {
|
|
|
|
"format": "%(asctime)s - [CMD_QUEUE] - %(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",
|
2020-08-13 01:33:36 +00:00
|
|
|
"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",
|
2020-08-13 01:33:36 +00:00
|
|
|
"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"
|
2020-08-31 15:29:32 +00:00
|
|
|
},
|
|
|
|
"schedule_file_handler": {
|
|
|
|
"class": "logging.handlers.RotatingFileHandler",
|
|
|
|
"formatter": "schedule",
|
|
|
|
"filename": "logs/schedule.log",
|
|
|
|
"maxBytes": 10485760,
|
|
|
|
"backupCount": 20,
|
|
|
|
"encoding": "utf8"
|
2023-11-05 18:26:27 +00:00
|
|
|
},
|
|
|
|
"auth_file_handler": {
|
|
|
|
"class": "logging.handlers.RotatingFileHandler",
|
|
|
|
"formatter": "auth",
|
|
|
|
"filename": "logs/auth.log",
|
|
|
|
"maxBytes": 10485760,
|
|
|
|
"backupCount": 20,
|
|
|
|
"encoding": "utf8"
|
2023-12-07 23:02:54 +00:00
|
|
|
},
|
|
|
|
"cmd_queue_file_handler": {
|
|
|
|
"class": "logging.handlers.RotatingFileHandler",
|
|
|
|
"formatter": "auth",
|
|
|
|
"filename": "logs/cmd_queue.log",
|
|
|
|
"maxBytes": 10485760,
|
|
|
|
"backupCount": 20,
|
|
|
|
"encoding": "utf8"
|
2024-04-17 22:03:10 +00:00
|
|
|
},
|
|
|
|
"audit_log_handler": {
|
|
|
|
"class": "logging.handlers.RotatingFileHandler",
|
|
|
|
"formatter": "audit",
|
|
|
|
"filename": "logs/audit.log",
|
|
|
|
"maxBytes": 10485760,
|
|
|
|
"backupCount": 20,
|
|
|
|
"encoding": "utf8"
|
2020-08-12 00:36:09 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"loggers": {
|
|
|
|
"": {
|
|
|
|
"level": "INFO",
|
2023-11-05 18:26:27 +00:00
|
|
|
"handlers": [
|
|
|
|
"main_file_handler",
|
|
|
|
"session_file_handler"
|
|
|
|
],
|
2020-08-12 00:36:09 +00:00
|
|
|
"propagate": false
|
2020-08-23 22:43:28 +00:00
|
|
|
},
|
|
|
|
"tornado.access": {
|
|
|
|
"level": "INFO",
|
2023-11-05 18:26:27 +00:00
|
|
|
"handlers": [
|
|
|
|
"tornado_access_file_handler"
|
|
|
|
],
|
2020-08-23 22:43:28 +00:00
|
|
|
"propagate": false
|
2020-08-31 15:29:32 +00:00
|
|
|
},
|
2022-01-12 22:29:45 +00:00
|
|
|
"apscheduler": {
|
2020-08-31 15:29:32 +00:00
|
|
|
"level": "INFO",
|
2023-11-05 18:26:27 +00:00
|
|
|
"handlers": [
|
|
|
|
"schedule_file_handler"
|
|
|
|
],
|
|
|
|
"propagate": false
|
|
|
|
},
|
|
|
|
"auth": {
|
|
|
|
"level": "INFO",
|
|
|
|
"handlers": [
|
|
|
|
"auth_file_handler"
|
|
|
|
],
|
2020-08-31 15:29:32 +00:00
|
|
|
"propagate": false
|
2023-12-07 23:02:54 +00:00
|
|
|
},
|
|
|
|
"cmd_queue": {
|
|
|
|
"level": "INFO",
|
|
|
|
"handlers": [
|
|
|
|
"cmd_queue_file_handler"
|
|
|
|
],
|
|
|
|
"propagate": false
|
2024-04-17 22:03:10 +00:00
|
|
|
},
|
|
|
|
"audit_log": {
|
|
|
|
"level": "INFO",
|
|
|
|
"handlers": [
|
|
|
|
"audit_log_handler"
|
|
|
|
]
|
2020-08-12 00:36:09 +00:00
|
|
|
}
|
|
|
|
}
|
2023-11-05 18:26:27 +00:00
|
|
|
}
|