1
sujin190 2015-01-22 14:21:28 +08:00 1
标准库logging本来就有handler可以发送到邮箱的啊,配置下就可以
|
2
microhan OP 能不能简单的贴个配置,好像是smtphandler?发送源地址127.0.0.1?
|
3
9hills 2015-01-22 16:03:12 +08:00 via iPhone 1
sentry麻烦么。。pip install 一下就好了,再没有更省心的了
|
5
sujin190 2015-01-22 20:59:18 +08:00
@microhan 不是,smtp地址
https://docs.python.org/2/library/logging.handlers.html#smtphandler 参数就是smpt的配置信息啊,qq邮箱,网易邮箱的设置里都有smtp配置信息 |
6
sujin190 2015-01-22 21:02:27 +08:00
@microhan
"smtp_handler":{ 'level': 'ERROR', 'class': 'logging.handlers.SMTPHandler', 'formatter': 'main', 'mailhost':‘smtp.exmail.qq.com’, "fromaddr":‘[email protected]", "toaddrs":["[email protected]"], "subject":"title", "credentials":("[email protected]", "passwd"), }, |