forked from golemfactory/clay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loggingconfig.py
85 lines (84 loc) · 2.46 KB
/
loggingconfig.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
# Golem logging configuration file.
# If you want to modify it locally the preferred way to do this is to create
# loggingconfig_local.py and overwrite LOGGING dict. Typical use case is:
# from loggingconfig import LOGGING
# LOGGING['handlers']['console']['level'] = 'DEBUG'
# LOGGING['root']['level'] = 'DEBUG'
# or
# LOGGING['handlers']['console']['level'] = 'DEBUG'
# LOGGING['loggers']['golem.task.taskmanager'] = {
# 'level': 'DEBUG',
# 'propagate': False,
# 'handlers': ['console',],
# }
LOGGING = {
'version': 1,
# False is required for golem.tools.assertlogs
'disable_existing_loggers': False,
'formatters': {
'simple': {
'()': 'golem.utils.UnicodeFormatter',
'format': '%(levelname)-8s [%(name)-35s] %(message)s',
},
'date': {
'()': 'golem.utils.UnicodeFormatter',
'format': '%(asctime)s %(levelname)-8s %(name)-35s %(message)s',
'datefmt': '%Y-%m-%d %H:%M:%S',
},
},
'filters': {},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'level': 'INFO',
'formatter': 'simple',
'filters': [],
'stream': 'ext://sys.stderr',
},
'file': {
'class': 'logging.handlers.TimedRotatingFileHandler',
'level': 'INFO',
'formatter': 'date',
# suffix is substituted in golem.core.common.config_logging()
'filename': '%(datadir)slogs/golem%(suffix)s.log',
'when': 'D',
'interval': 1,
'backupCount': 5,
'encoding': 'utf-8',
},
},
'root': {
'level': 'WARNING',
'handlers': ['console', 'file', ],
'filters': [],
},
'loggers': {
'golem': {
'level': 'WARNING',
'propagate': True,
},
'golem.ethereum': {
'level': 'INFO',
'propagate': True,
},
'golem.rpc.crossbar': {
'level': 'INFO',
'propagate': True,
},
'twisted': {
'level': 'INFO',
'propagate': True,
},
'golem.network': {'propagate': True},
'golem.network.transport': {'propagate': True},
'apps': {
'level': 'DEBUG',
'propagate': True,
},
'test': {
'level': 'DEBUG',
'propagate': False,
'handlers': ['console', 'file', ],
},
},
}