-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlog_config.yaml
71 lines (61 loc) · 1.75 KB
/
log_config.yaml
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
version: 1
disable_existing_loggers: true
formatters:
verbose:
format: '%(asctime)s - %(levelname)s - %(name)s - %(process)d:%(processName)s - %(funcName)s:%(lineno)d - %(message)s'
simple:
format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
uvicorn_default:
"()": uvicorn.logging.DefaultFormatter
format: '%(asctime)s - %(levelprefix)s %(name)s - %(message)s'
handlers:
console:
class: logging.StreamHandler
level: INFO
formatter: uvicorn_default
stream: ext://sys.stderr
debug_handler:
class: logging.handlers.RotatingFileHandler
level: DEBUG
formatter: simple
filename: ./logs/debug.log
maxBytes: 10485760 # 10MB
backupCount: 5
encoding: utf8
error_handler:
class: logging.handlers.RotatingFileHandler
level: WARNING
formatter: verbose
filename: ./logs/errors.log
maxBytes: 10485760 # 10MB
backupCount: 5
encoding: utf8
access_handler:
class: logging.handlers.RotatingFileHandler
level: INFO
formatter: simple
filename: ./logs/access.log
maxBytes: 10485760 # 10MB
backupCount: 5
encoding: utf8
root:
level: NOTSET
handlers: [console, debug_handler, error_handler]
propagate: false
loggers:
uvicorn:
level: DEBUG
handlers: [console, debug_handler]
propagate: false
uvicorn.error:
level: ERROR
handlers: [console, error_handler]
propagate: false
uvicorn.access:
level: INFO
handlers: [console, access_handler]
propagate: false
watchfiles:
level: INFO
handlers: [console]
propagate: false