-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogging.json
80 lines (80 loc) · 1.91 KB
/
logging.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"simple": {
"format": "%(asctime)s,%(msecs)03d %(levelname)s [%(name)s.%(module)s.%(funcName)s] [%(lineno)s] %(message)s",
"datefmt": "%Y-%m-%dT%H:%M:%S"
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"level": "DEBUG",
"formatter": "simple",
"stream": "ext://sys.stdout"
},
"info_file_handler": {
"class": "logging.handlers.TimedRotatingFileHandler",
"when": "midnight",
"interval": 1,
"utc": true,
"level": "INFO",
"formatter": "simple",
"filename": "$HOME/logs/info.log",
"backupCount": 32,
"encoding": "utf8"
},
"warning_file_handler": {
"class": "logging.handlers.TimedRotatingFileHandler",
"when": "midnight",
"interval": 1,
"utc": true,
"backupCount": 32,
"level": "WARNING",
"formatter": "simple",
"filename": "$HOME/logs/warnings.log",
"encoding": "utf8"
},
"error_file_handler": {
"class": "logging.handlers.TimedRotatingFileHandler",
"when": "midnight",
"interval": 1,
"utc": true,
"backupCount": 32,
"formatter": "simple",
"level": "ERROR",
"filename": "$HOME/logs/errors.log",
"encoding": "utf8"
},
"debug_file_handler": {
"class": "logging.handlers.TimedRotatingFileHandler",
"level": "DEBUG",
"when": "midnight",
"interval": 1,
"utc": true,
"formatter": "simple",
"filename": "$HOME/logs/debug.log",
"backupCount": 32,
"encoding": "utf8"
}
},
"loggers": {
"my_module": {
"level": "ERROR",
"handlers": [
"console"
],
"propagate": "no"
}
},
"root": {
"level": "INFO",
"handlers": [
"console",
"info_file_handler",
"warning_file_handler",
"error_file_handler"
]
}
}