-
Notifications
You must be signed in to change notification settings - Fork 0
/
logging.ini
54 lines (42 loc) · 1.04 KB
/
logging.ini
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
[loggers]
keys = root, uvicorn.error, uvicorn.access
[handlers]
keys = console, error_file, access_file
[formatters]
keys = generic, access
[logger_root]
; Logging level for all loggers
level = INFO
handlers = console
[logger_uvicorn.error]
level = NOTSET
handlers = error_file
propagate = 1
qualname = uvicorn.error
[logger_uvicorn.access]
level = NOTSET
handlers = access_file
propagate = 0
qualname = uvicorn.access
[handler_console]
class = app.rich_logging.RichConsoleHandler
;This can be customized width and color style
args = (170, "bright_black")
kwargs = {"omit_repeated_times":False, "rich_tracebacks": True, "tracebacks_show_locals": True}
level = NOTSET
formatter = generic
[handler_error_file]
class = logging.FileHandler
formatter = generic
args = ('/tmp/app.error.log',)
[handler_access_file]
class = logging.FileHandler
formatter = access
args = ('/tmp/app.access.log',)
[formatter_generic]
format = [%(name)s] %(message)s
datefmt = %H:%M:%S
class = logging.Formatter
[formatter_access]
format = %(message)s
class = logging.Formatter