-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathlogging.json
More file actions
81 lines (81 loc) · 2.21 KB
/
logging.json
File metadata and controls
81 lines (81 loc) · 2.21 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
{
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"file": {
"format": "%(levelname)s|%(name)s|%(asctime)s|%(message)s|%(filename)s|%(lineno)d|%(funcName)s|%(module)s|%(process)d|%(processName)s|%(thread)d|%(threadName)s|%(taskName)s"
},
"json": {
"()": "logging_course.formatters.JSONLogFormatter",
"include_keys": [
"created",
"message",
"levelname",
"name",
"filename",
"module",
"exc_info",
"lineno",
"threadName",
"processName",
"taskName",
"args",
"contexto"
]
},
"console_stdout": { "format": "OUT: %(message)s", "datefmt": "[%X]" },
"console_stderr": { "format": "ERR: %(message)s", "datefmt": "[%X]" }
},
"filters": {
"max_level_info": {
"()": "logging_course.filters.MaxLevelFilter",
"max_level": "INFO"
}
},
"handlers": {
"queue": {
"class": "logging.handlers.QueueHandler",
"handlers": ["console_stdout", "console_stderr", "file"],
"respect_handler_level": true
},
"console_stdout": {
"()": "logging_course.handlers.MyRichHandler",
"formatter": "console_stdout",
"rich_tracebacks": false,
"tracebacks_show_locals": false,
"show_time": true,
"show_level": true,
"omit_repeated_times": false,
"markup": false,
"enable_link_path": true,
"show_path": true,
"file": "stdout",
"level": "DEBUG",
"filters": ["max_level_info"]
},
"console_stderr": {
"()": "logging_course.handlers.MyRichHandler",
"formatter": "console_stderr",
"rich_tracebacks": false,
"tracebacks_show_locals": false,
"show_time": true,
"show_level": true,
"omit_repeated_times": false,
"markup": false,
"enable_link_path": true,
"show_path": true,
"file": "stderr",
"level": "WARNING"
},
"file": {
"class": "logging.handlers.RotatingFileHandler",
"formatter": "json",
"filename": "logs/log.jsonl",
"maxBytes": 5242880,
"backupCount": 5,
"encoding": "utf-8"
}
},
"root": { "handlers": ["queue"] },
"loggers": { "meuapp": { "level": "DEBUG" } }
}