-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_log.py
39 lines (36 loc) · 946 Bytes
/
config_log.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
LOGGER_CONFIG = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'my_format': {
'format': '{asctime} - '
'{levelname} - '
'{name} - '
'{module}:{funcName}:{lineno} - '
'{message}',
'style': '{'
}
},
'handlers': {
'file': {
'class': 'logging.handlers.RotatingFileHandler',
'level': 'INFO',
'formatter': 'my_format',
'filename': 'log.log',
'maxBytes': 50000000,
'backupCount': 5,
'encoding': 'utf8'
},
'std': {
'class': 'logging.StreamHandler',
'level': 'NOTSET',
'formatter': 'my_format'
}
},
'loggers': {
'bot_logger': {
'level': 'DEBUG',
'handlers': ['file', 'std']
}
}
}