pyspider icon indicating copy to clipboard operation
pyspider copied to clipboard

pyspider 预警功能

Open doyus opened this issue 6 years ago • 2 comments

有什么办法可以让框架爬取报错时发邮件通知,在哪改这个东西

doyus avatar Mar 02 '19 11:03 doyus

我的做法是修改 pyspider/logging.conf ,加以下配置

[handler_file] class=logging.handlers.RotatingFileHandler formatter=pretty level=DEBUG args=('./logs/pyspider.log','a',20000,5,) 将日志落地,然后将日志文件接入 Loghub(ELK),在 Loghub 里面抓非 200 的日志就行了

zhangzhanqicixi avatar Mar 02 '19 12:03 zhangzhanqicixi

好的,谢谢

doyus avatar Mar 04 '19 08:03 doyus