forked from unl1k3ly/AnchorHODL
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlogging_config.py
90 lines (89 loc) · 2.63 KB
/
logging_config.py
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
89
# Logging setup
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'standard': {
'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s',
'datefmt': '%d-%m-%Y %H:%M:%S '
},
'repay_logger_format': {
'format': '%(asctime)s %(message)s',
'datefmt': '%d-%m-%Y %H:%M:%S '
},
'info_logger_format': {
'format': '%(asctime)s %(message)s',
'datefmt': '%d-%m-%Y %H:%M:%S '
},
},
'handlers': {
'default': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'logs/default.log',
'maxBytes': 1024*1024*5, # 5MB
'backupCount': 5,
'formatter': 'standard'
},
'repay_logger': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'logs/repay.log',
'maxBytes': 1024*1024*5, # 5MB
'backupCount': 5,
'formatter': 'repay_logger_format'
},
'apscheduler': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'logs/apscheduler.log',
'maxBytes': 1024 * 1024 * 5, # 5MB
'backupCount': 5,
},
'werkzeug': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'logs/werkzeug.log',
'maxBytes': 1024 * 1024 * 5, # 5MB
'backupCount': 5,
},
'info_logger': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'logs/info.log',
'maxBytes': 1024 * 1024 * 5, # 5MB
'backupCount': 5,
'formatter': 'info_logger_format'
},
},
'loggers': {
'': {
'handlers': ['default'],
'level': 'INFO',
'propagate': True,
},
'repay_logger': {
'handlers': ['repay_logger'],
'level': 'INFO',
'propagate': False,
},
'apscheduler': {
'handlers': ['apscheduler'],
'level': 'INFO',
'propagate': False,
},
'werkzeug': {
'handlers': ['werkzeug'],
'level': 'INFO',
'propagate': False,
},
'info_logger': {
'handlers': ['info_logger'],
'level': 'INFO',
'propagate': False,
},
'urllib3.connectionpool': {
'level': 'WARNING',
}
},
}