-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlogging.conf
42 lines (33 loc) · 1.04 KB
/
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
# This defines the OlcbChecker's logging
# It sends logs to both the console (i.e. terminal)
# and a log.txt file.
# For more information on the Python logging capabilities, see:
# https://docs.python.org/3/howto/logging.html
[loggers]
keys=root
[handlers]
keys=consoleHandler,fileHandler
[formatters]
keys=consoleFormatter,fileFormatter
# We default to DEBUG level so the -T option can set its own level
[logger_root]
level=DEBUG
handlers=consoleHandler,fileHandler
# Defines output to the console (i.e. terminal)
# We default to DEBUG level so the -T option can set its own level
[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=consoleFormatter
args=(sys.stdout,)
[formatter_consoleFormatter]
format=%(message)s
# Defines output to the 'log.txt' file, creating it anew on each run
# We default to DEBUG level so the -T option can set its own level
[handler_fileHandler]
class=FileHandler
level=DEBUG
formatter=fileFormatter
args=("log.txt",'w',)
[formatter_fileFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s