-
Notifications
You must be signed in to change notification settings - Fork 0
/
logging.conf
52 lines (42 loc) · 1.15 KB
/
logging.conf
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
[loggers]
keys=root, gunicorn.error, gunicorn.access
[handlers]
keys=console, error_file, access_file
[formatters]
keys=generic, access
[logger_root]
level=DEBUG
handlers=console, error_file
[logger_gunicorn.error]
level=INFO
handlers=error_file
propagate=1
qualname=gunicorn.error
[logger_gunicorn.access]
level=INFO
handlers=access_file
propagate=0
qualname=gunicorn.access
[handler_console]
class=StreamHandler
formatter=generic
args=(sys.stdout, )
[handler_error_file]
# https://docs.python.org/3/library/logging.handlers.html#logging.handlers.RotatingFileHandler
class=logging.handlers.RotatingFileHandler
formatter=generic
# filename, mode, maxBytes, backupCount
args=('testat.error.log','a', 10_000_000, 10)
[handler_access_file]
# https://docs.python.org/3/library/logging.handlers.html#logging.handlers.RotatingFileHandler
class=logging.handlers.RotatingFileHandler
formatter=access
# filename, mode, maxBytes, backupCount
args=('testat.access.log', 10_000_000, 10)
[formatter_generic]
format=%(asctime)s [%(process)d] [%(levelname)s] %(message)s
datefmt=%Y-%m-%d %H:%M:%S
class=logging.Formatter
[formatter_access]
format=%(message)s
class=logging.Formatter