scrapy结束时日志显示信息详解

爬虫结束日志收集信息,可以作为日志收集或爬虫监控使用

2019-08-05 08:22:04 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{'downloader/exception_count': 1781,         # 异常数量
'downloader/exception_type_count/twisted.internet.error.ConnectionRefusedError': 34,            # 链接错误数量
'downloader/exception_type_count/twisted.internet.error.TimeoutError': 1724,       # 超时数量
'downloader/exception_type_count/twisted.web._newclient.ResponseFailed': 7,        # 页面响应错误数量
'downloader/exception_type_count/twisted.web._newclient.ResponseNeverReceived': 16,    # 没有找到的数量
'downloader/request_bytes': 11834762,     # 请求字节大小
'downloader/request_count': 30080,        # 请求次数
'downloader/request_method_count/GET': 30080,    # GET请求次数
'downloader/response_bytes': 762108730,    # 响应字节大小
'downloader/response_count': 28299,       # 响应次数
'downloader/response_status_count/200': 28299,    # 状态码为200的次数
'finish_reason': 'finished',    # 爬虫结束原因
'finish_time': datetime.datetime(2019, 8, 5, 8, 22, 4, 856127),    # 爬虫结束时间
'log_count/ERROR': 1,    # 日志记录ERROR等级次数
'log_count/INFO': 52,    # 日志记录INFO等级次数
'log_count/WARNING': 7,    # 日志记录WARNING等级次数
'memusage/max': 315863040,    # 最大占用内存
'memusage/startup': 58642432,    # 启动占用内存
'request_depth_max': 1,    # 最大请求深度
'response_received_count': 28299,    # 接收响应次数
'retry/count': 1773,    # 重尝试次数
'retry/max_reached': 8,    # 最大重尝试次数
'retry/reason_count/twisted.internet.error.ConnectionRefusedError': 34,    # 重尝试链接报错次数
'retry/reason_count/twisted.internet.error.TimeoutError': 1716,    # 重尝试超时报错次数
'retry/reason_count/twisted.web._newclient.ResponseFailed': 7,    # 页面错误重尝试次数
'retry/reason_count/twisted.web._newclient.ResponseNeverReceived': 16,    # 没有找到重尝试次数
'scheduler/dequeued': 30080,    # 调度器移除
'scheduler/dequeued/memory': 30080,
'scheduler/enqueued': 30080,
'scheduler/enqueued/memory': 30080,
'start_time': datetime.datetime(2019, 8, 5, 7, 59, 16, 803793)}    # 爬虫开始时间
2019-08-05 08:22:04 [scrapy.core.engine] INFO: Spider closed (finished)     # 爬虫结束

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值