-
Notifications
You must be signed in to change notification settings - Fork 3
/
ocrd_logging.conf
125 lines (109 loc) · 2.8 KB
/
ocrd_logging.conf
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# This is a template configuration file to demonstrate
# formats and destinations of log messages with OCR-D.
# It's meant as an example, and should be customized.
# To get into effect, you must put a copy (under the same name)
# into your CWD, HOME or /etc. These directories are searched
# in said order, and the first find wins. When no config file
# is found, the default logging configuration applies (cf. ocrd_logging.py).
#
# mandatory loggers section
# configure loggers with corresponding keys "root",""
# each logger requires a corresponding configuration section below
#
[loggers]
keys=root,ocrd_profile,ocrd_tensorflow,ocrd_shapely_geos,ocrd_PIL
#
# mandatory handlers section
# handle output for logging "channel"
# i.e. console, file, smtp, syslog, http, ...
# each handler requires a corresponding handler configuration section below
#
[handlers]
keys=consoleHandler,fileHandler
#
# optional formatters section
# format message records, to be used differently by logging handlers
# each formatter requires a corresponding formatter section below
#
[formatters]
keys=defaultFormatter,detailedFormatter
#
# default logger "root" configured to use only consoleHandler
#
[logger_root]
level=INFO
handlers=consoleHandler
#
# additional logger configurations can be added
# as separate configuration sections like below
#
# example logger "ocrd_workspace" uses fileHandler and overrides
# default log level "INFO" with custom level "DEBUG"
# "qualname" must match the logger label used in the corresponding
# ocrd modul
# see in the modul-of-interrest (moi)
#
# example configuration entry
#
# logger ocrd.workspace
#
#[logger_ocrd_workspace]
#level=DEBUG
#handlers=fileHandler
#qualname=ocrd.workspace
[logger_ocrd_profile]
level=INFO
handlers=fileHandler
qualname=ocrd.process.profile
#
# logger tensorflow
#
[logger_ocrd_tensorflow]
level=ERROR
handlers=consoleHandler
qualname=tensorflow
#
# logger shapely.geos
#
[logger_ocrd_shapely_geos]
level=ERROR
handlers=consoleHandler
qualname=shapely.geos
#
# logger PIL
#
[logger_ocrd_PIL]
level=INFO
handlers=consoleHandler
qualname=PIL
#
# handle stdout output
#
[handler_consoleHandler]
#class=StreamHandler
class=logging.handlers.SysLogHandler
formatter=defaultFormatter
#args=(sys.stderr,)
args=('/dev/log', 'user')
#
# example logfile handler
# handle output with logfile
#
[handler_fileHandler]
#class=FileHandler
class=logging.NullHandler
formatter=detailedFormatter
#args=('ocrd.log','a+')
args=()
#
# default log format conforming to OCR-D (https://ocr-d.de/en/spec/cli#logging)
#
[formatter_defaultFormatter]
format=%(asctime)s.%(msecs)03d %(levelname)s %(name)s - %(message)s
datefmt=%H:%M:%S
#
# store more logging context information
#
[formatter_detailedFormatter]
format=%(asctime)s.%(msecs)03d %(levelname)-8s (%(name)s)[%(filename)s:%(lineno)d] - %(message)s
datefmt=%H:%M:%S