-
Notifications
You must be signed in to change notification settings - Fork 2
/
logging_config.json
56 lines (51 loc) · 1.63 KB
/
logging_config.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
"version": 1,
"disable_exsisting_loggers": false,
"formatters": {
"simple": {"format": "%(levelname)s: %(message)s"},
"expanded": {
"format": "%(levelname)s - %(name)s - %(filename)s - %(module)s - %(funcName)s - %(message)s"
},
"detailed": {
"format": "[%(levelname)s|%(module)s|%(funcName)s|L%(lineno)d] %(asctime)s: %(message)s",
"datefmt": "%Y-%m-%dT%H:%M:%S%z"
}
},
"handlers": {
"stdout": {
"class": "logging.StreamHandler",
"formatter": "simple",
"stream": "ext://sys.stdout"
},
"stderr": {
"class": "logging.StreamHandler",
"level": "WARNING",
"formatter": "expanded",
"stream": "ext://sys.stderr"
},
"debugfile": {
"class": "logging.handlers.RotatingFileHandler",
"level": "DEBUG",
"formatter": "detailed",
"filename": "logs/debug.log",
"maxBytes": 200000000,
"backupCount": 3
},
"errorfile": {
"class": "logging.handlers.RotatingFileHandler",
"level": "WARNING",
"formatter": "detailed",
"filename": "logs/error.log",
"maxBytes": 200000000,
"backupCount": 2
},
"queue_handler": {
"class": "logging.handlers.QueueHandler",
"handlers": ["stdout", "stderr", "errorfile", "debugfile"],
"respect_handler_level": true
}
},
"loggers": {
"root": {"level": "DEBUG", "handlers": ["queue_handler"]}
}
}