forked from ivallesp/YNAB-reporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logging.ini
40 lines (33 loc) · 964 Bytes
/
logging.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
;declare the existing loggers
[loggers]
keys=root
;declare the existing handlers
[handlers]
keys=fileHandler, streamHandler
;declare the existing formatters
[formatters]
keys=defaultFileFormatter, defaultStreamFormatter
;associate the handlers to a logger
[logger_root]
level=DEBUG
handlers=fileHandler, streamHandler
;Dump the logs to a file
[handler_fileHandler]
class=FileHandler
level=INFO
formatter=defaultFileFormatter
;file path of the logging file
args=("./logs/main.log",)
;Dump the logs to stdout
[handler_streamHandler]
class=StreamHandler
level=INFO
formatter=defaultStreamFormatter
args=(sys.stdout,)
;Aligned format, generally for the file handlers
[formatter_defaultFileFormatter]
format=%(asctime)s.%(msecs)03d | %(levelname)-8s | %(module)-20s | %(funcName)-35s | %(message)s
datefmt=%Y-%m-%d | %H:%M:%S
;Just the message, analogy to print statements. Generally for the stream handlers
[formatter_defaultStreamFormatter]
format=%(message)s