-
Notifications
You must be signed in to change notification settings - Fork 13
/
logging.conf
40 lines (31 loc) · 718 Bytes
/
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
# loggers for different loaders
[loggers]
keys=root,main
# null - no output, stdout - to console, file - to loader.log
[handlers]
keys=null,stdout,file
[formatters]
keys=simpleFormatter
# root(default) turn it off
[logger_root]
level=CRITICAL
handlers=null
# main.py
[logger_main]
level=INFO
qualname=__main__
handlers=stdout
[handler_null]
class=logging.NullHandler
formatter=simpleFormatter
args=()
[handler_stdout]
class=logging.StreamHandler
formatter=simpleFormatter
args=(sys.stdout,)
[handler_file]
class=logging.FileHandler
formatter=simpleFormatter
args=("demo.log",)
[formatter_simpleFormatter]
format=[%(asctime)s][%(filename)s:%(lineno)s - %(name)s.%(funcName)s()][%(levelname)s][msg:%(message)s]