-
Notifications
You must be signed in to change notification settings - Fork 27
/
logging_config.ini
53 lines (43 loc) · 1.14 KB
/
logging_config.ini
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
# More configuraiton file format information in: https://docs.python.org/3/library/logging.config.html
[loggers]
keys=root,fileLogger,sysLogger
[handlers]
keys=fileHandler,sysHandler,stdoHandler
[formatters]
keys=customFormatter
[logger_root]
level=INFO
handlers=fileHandler,sysHandler,stdoHandler
# File logger configuration, used to redirect logs to a file (/var/log/hanadb_exporter.log by default)
[logger_fileLogger]
level=WARNING
handlers=fileHandler
qualname=shaptools,hanadb_exporter
propagate=0
# Logger to configure the syslog output
[logger_sysLogger]
level=WARNING
handlers=sysHandler,stdoHandler
qualname=shaptools,hanadb_exporter
propagate=0
# Handlers associated to the loggers
[handler_fileHandler]
class=FileHandler
level=WARNING
formatter=customFormatter
args=('%(logfilename)s', 'a')
[handler_sysHandler]
class=handlers.SysLogHandler
level=WARNING
formatter=customFormatter
args=('/dev/log',)
# standard output handler
[handler_stdoHandler]
class=StreamHandler
level=WARNING
formatter=customFormatter
args=(sys.stdout,)
# formatters
# this print timestamp also
[formatter_customFormatter]
format=%(asctime)s %(levelname)s %(name)s %(message)s