forked from ARCH-commons/i2p-transform
-
Notifications
You must be signed in to change notification settings - Fork 5
/
logging.cfg
71 lines (60 loc) · 1.65 KB
/
logging.cfg
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
# see section 15.8.3. Configuration file format in
# http://docs.python.org/2/library/logging.config.html
#
# also:
# https://github.com/pysysops/docker-luigi-taskrunner/blob/master/etc/luigi/logging.cfg
# https://pypi.python.org/pypi/python-json-logger
# https://stedolan.github.io/jq/manual/v1.5/
#
[loggers]
keys=root,luigi_debug
[logger_root]
level=INFO
handlers=console,detail
#handlers=console
[logger_luigi_debug]
level=DEBUG
handlers=luigi_debug
qualname=luigi-interface
[handlers]
keys=console,detail,luigi_debug
#keys=console,luigi_debug
[handler_console]
level=INFO
# class=StreamHandler
class=eventlog.TextHandler
args=(sys.stderr, ['execute', 'execute commit', 'complete query', 'find chunks'])
# args=(3, 0.1)
formatter=timed
[handler_detail]
level=INFO
class=FileHandler
# use detail_log_dir rather than dir to facilitate stream editing
detail_log_dir=log
detail_log_file=%(detail_log_dir)s/cdm-detail.json
# append to log file
#args=('%(detail_log_file)s', 'a', None, True)
# overwrite log file
args=('%(detail_log_file)s', 'w')
formatter=json
[handler_luigi_debug]
level=DEBUG
class=FileHandler
luigi_debug_log_dir=log
luigi_debug_log_file=%(luigi_debug_log_dir)s/cdm-luigi-debug.json
# append to log file
# args=('%(luigi_debug_log_file)s', 'a')
# overwrite log file
args=('%(luigi_debug_log_file)s', 'w')
formatter=json
[formatters]
keys=timed, json
[formatter_timed]
class=logging.Formatter
# %(name)s?
format=%(asctime)s %(process)s %(levelname)s: %(message)s
#datefmt=%02H:%02M:%02S
[formatter_json]
class = pythonjsonlogger.jsonlogger.JsonFormatter
format=%(asctime)s %(process)s %(name) %(levelname): %(message)s %(args)s
#datefmt=%Y-%m-%02d %02H:%02M:%02S