-
Notifications
You must be signed in to change notification settings - Fork 30
/
conf.py
45 lines (43 loc) · 862 Bytes
/
conf.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
from pathlib import Path
p = Path("logs")
if not p.exists():
p.mkdir()
dictConfig = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'standard': {
'format': '%(asctime)s [%(levelname)s] %(name)s:: %(message)s',
},
},
'handlers': {
'default': {
'level': 'INFO',
'formatter': 'standard',
'class': 'logging.StreamHandler',
'stream': 'ext://sys.stdout',
},
'file': {
'class': 'logging.handlers.RotatingFileHandler',
'level': 'DEBUG',
'formatter': 'standard',
'filename': 'logs/logfile.log',
'mode': 'a',
'maxBytes': 5_242_880,
'backupCount': 3,
'encoding': 'utf-8',
},
},
'loggers': {
'__main__': {
'handlers': ['default','file'],
'level': 'DEBUG',
'propagate': False,
},
'camera': {
'handlers': ['default', 'file'],
'level': 'DEBUG',
'propagate': False,
},
}
}