-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclepylogconfig.py
More file actions
56 lines (44 loc) · 1.15 KB
/
clepylogconfig.py
File metadata and controls
56 lines (44 loc) · 1.15 KB
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
# vim: set expandtab ts=4 sw=4 filetype=python fileencoding=utf8:
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'root': {
'level': "ERROR",
'handlers': ['console', "tmpfile"],
},
'formatters': {
'basic': {
'format': "%(asctime)-22s [%(process)d] %(name)-30s %(lineno)-5d %(levelname)-8s %(message)s",
},
'colorfmt': {
'format': "%(log_color)s%(asctime)-22s %(message)s",
'()': "colorlog.ColoredFormatter"
},
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'formatter': 'colorfmt',
# 'level': 'DEBUG',
},
"tmpfile": {
"class":"logging.FileHandler",
"formatter": "basic",
"level": "DEBUG",
"filename": "/tmp/clepy.log",
"mode": "a",
},
},
'loggers': {
"clepy": {
"handlers": ["console", "tmpfile"],
"level": "DEBUG",
"propagate": False
},
"boto": {
"handlers": ["console"],
"level": "DEBUG",
"propagate": False,
},
},
}