pyspider
pyspider copied to clipboard
pyspider 预警功能
有什么办法可以让框架爬取报错时发邮件通知,在哪改这个东西
我的做法是修改 pyspider/logging.conf ,加以下配置
[handler_file] class=logging.handlers.RotatingFileHandler formatter=pretty level=DEBUG args=('./logs/pyspider.log','a',20000,5,)
将日志落地,然后将日志文件接入 Loghub(ELK),在 Loghub 里面抓非 200 的日志就行了
好的,谢谢