forked from RY-2718/frontera_crawler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogging.conf
113 lines (88 loc) · 2.23 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[loggers]
keys=root,ignore_logger,ip_logger,middleware_logger,url_logger,dbw,sw
[handlers]
keys=hand01,ignore_handler,ip_handler,middleware_handler,url_handler,dbw_handler,sw_handler,stream_handler
[formatters]
keys=form01,form02,form_simple,form_message_only
[logger_root]
level=INFO
handlers=hand01
[logger_ignore_logger]
level=DEBUG
handlers=ignore_handler
qualname=ignore_logger
propagate=0
[logger_ip_logger]
level=DEBUG
handlers=ip_handler
qualname=ip_logger
propagate=0
[logger_middleware_logger]
level=DEBUG
handlers=middleware_handler
qualname=middleware_logger
propagate=0
[logger_url_logger]
level=DEBUG
handlers=url_handler
qualname=url_logger
propagate=0
[logger_dbw]
level=INFO
handlers=stream_handler, dbw_handler
qualname=db-worker
propagate=0
[logger_sw]
level=INFO
handlers=stream_handler, sw_handler
qualname=strategy-worker
propagate=0
[handler_hand01]
class=handlers.RotatingFileHandler
level=INFO
args=("scrapy_log/scrapy.log", 'a', (50*1024*1024), )
formatter=form01
[handler_ignore_handler]
level=DEBUG
class=handlers.RotatingFileHandler
args=("scrapy_log/ignore.log", 'a', (50*1024*1024), )
formatter=form_simple
[handler_ip_handler]
level=DEBUG
class=handlers.RotatingFileHandler
args=("scrapy_log/ip.log", 'a', (50*1024*1024), )
formatter=form_message_only
[handler_middleware_handler]
level=DEBUG
class=handlers.RotatingFileHandler
args=("scrapy_log/middleware.log", 'a', (50*1024*1024), )
formatter=form_simple
[handler_url_handler]
level=DEBUG
class=handlers.TimedRotatingFileHandler
args=("urls/urls.log", "midnight",)
formatter=form_message_only
[handler_dbw_handler]
class=handlers.RotatingFileHandler
level=INFO
args=('frontera_log/dbw.log', 'a', (50*1024*1024), )
formatter=form02
[handler_sw_handler]
class=handlers.RotatingFileHandler
args=('frontera_log/sw.log', 'a', (50*1024*1024), )
formatter=form02
[handler_stream_handler]
class=StreamHandler
level=INFO
args=(sys.stdout,)
formatter=form02
[formatter_form01]
format=%(asctime)s [%(name)s] %(levelname)s: %(message)s
datefmt=%Y-%m-%d %H:%M:%S
[formatter_form_simple]
format=%(asctime)s %(message)s
[formatter_form_message_only]
format=%(message)s
[formatter_form02]
format=%(log_color)s %(asctime)s %(levelname)-8s %(name)-15s %(message)s
class=colorlog.ColoredFormatter