-
Notifications
You must be signed in to change notification settings - Fork 770
/
logging.conf
45 lines (35 loc) · 931 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
40
41
42
43
44
45
[loggers]
keys=root,weibo
[handlers]
keys=consoleHandler,fileHandler,errorHandler
[formatters]
keys=consoleFormatter,fileFormatter,errorFormatter
[logger_root]
level=DEBUG
handlers=consoleHandler,fileHandler,errorHandler
[logger_weibo]
level=DEBUG
handlers=consoleHandler,fileHandler,errorHandler
qualname=weibo
propagate=0
[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=consoleFormatter
args=(sys.stdout,)
[handler_fileHandler]
class=handlers.TimedRotatingFileHandler
level=INFO
formatter=fileFormatter
args=('log/all.log', 'D', 1, 5, 'utf-8', False, False)
[handler_errorHandler]
class=FileHandler
level=WARNING
formatter=errorFormatter
args=('log/error.log', 'a','utf-8')
[formatter_consoleFormatter]
format=%(message)s
[formatter_fileFormatter]
format=%(asctime)s - %(levelname)s - %(message)s
[formatter_errorFormatter]
format=%(asctime)s - %(levelname)s - %(filename)s[:%(lineno)d] - %(message)s