-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogging.json
More file actions
88 lines (88 loc) · 2.85 KB
/
logging.json
File metadata and controls
88 lines (88 loc) · 2.85 KB
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
81
82
83
84
85
86
87
88
{
"version": 1,
"disable_existing_loggers": true,
"formatters": {
"brief": {
"class": "logging.Formatter",
"style": "{",
"datefmt": "%I:%M:%S",
"format": "{levelname:8s}; {name:<15s}; {message:s}"
},
"simple": {
"class": "logging.Formatter",
"style": "{",
"datefmt": "%I:%M:%S",
"format": "{message:s}"
},
"debug": {
"class": "logging.Formatter",
"style": "{",
"datefmt": "%I:%M:%S",
"format": "[{levelname:s}:{lineno:d}- {funcName:<15s} {message:s}"
},
"multi-process": {
"class": "logging.Formatter",
"style": "{",
"datefmt": "%I:%M:%S",
"format": "{levelname:8s}; {process:5d}; {asctime:s}; {name:<15s} {lineno:4d}; {message:s}"
},
"multi-thread": {
"class": "logging.Formatter",
"style": "{",
"datefmt": "%I:%M:%S",
"format": "{levelname:8s}; {threadName:5d}; {asctime:s}; {name:<15s} {lineno:4d}; {message:s}"
},
"verbose": {
"class": "logging.Formatter",
"style": "{",
"datefmt": "%I:%M:%S",
"format": "{levelname:8s}; {process:5d}; {threadName:8s}; {asctime:s}; {name:<15s} {lineno:4d}; {message:s}"
},
"multiline": {
"class": "logging.Formatter",
"style": "{",
"datefmt": "%I:%M:%S",
"format": "{levelname:8s}\n{process:5d}\n{threadName:8s}\n{asctime:s}\n{name:<15s}{lineno:4d}\n{message:s}\n"
}
},
"handlers": {
"console":{
"level": "INFO",
"class": "logging.StreamHandler",
"formatter": "simple",
"stream" : "ext://sys.stdout"
},
"file_handler": {
"level": "DEBUG",
"class": "logging.handlers.RotatingFileHandler",
"formatter": "debug",
"filename": "info.log",
"backupCount": 20,
"mode":"w",
"encoding": "utf-8"
},
"warn_handler": {
"level": "WARNING",
"class": "logging.handlers.RotatingFileHandler",
"formatter": "simple",
"filename": "warn.log",
"mode":"w",
"backupCount": 20,
"encoding": "utf-8"
},
"smtp": {
"level": "ERROR",
"class": "logging.handlers.SMTPHandler",
"formatter": "multiline",
"mailhost": ["127.0.0.1", 25],
"fromaddr": "sender@example.com",
"toaddrs": ["recipient@example.com"],
"subject": "Something went wrong"
}
},
"loggers": {},
"root": {
"handlers": ["console","warn_handler", "file_handler"],
"level": "DEBUG"
}
}