具有 app-engine-patch 的 Google App Engine 是否支持在出现 500 个错误时向 ADMINS 发送电子邮件?
Django 将通过电子邮件发送ADMINS 出现 500 错误。
阅读 app-engine-patch 文档,它声称启用邮件支持,但我不知道它是否足以支持 500 封电子邮件。
我尝试了一下,它似乎不起作用,但这是一个无提示的故障,没有日志消息,所以我可能配置错误。
有人有在 500 上向管理员发送应用程序引擎补丁电子邮件的经验吗?
Django will email ADMINS upon 500 errors.
Reading app-engine-patch docs, it claims to enable mail support, but I can't tell if it does so enough to support 500 emailing.
I tried it and it doesn't seem to be working, but it is a silent failure with no log messages, so I might have misconfigured something.
Does anyone have experience with app-engine-patch emailing ADMINS upon 500?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
原来是我配置错误。
错误的配置:
良好的配置:
请参阅有关 ADMINS 的文档。
另外,请谨慎对待具有单个条目的元组,因为 Python 需要尾随逗号:
Turns out I had misconfigured.
BAD configuration:
GOOD configuration:
See the docs about ADMINS.
Also, be cautious about a tuple with a single entry, which due to Python requires a trailing comma:
正如您所描述的那样,我遇到了无声错误;我唯一的线索是发送的电子邮件配额已被使用。
我已经在
settings.py
中配置了DEBUG
和ADMIN
;添加SERVER_EMAIL
指定发件人后,一切开始正常工作:现在我收到有关 500 错误的电子邮件。
I was getting silent errors just as you describe; the only clue I had was that the sent email quota was getting used.
I already had
DEBUG
andADMIN
configured in mysettings.py
; after addingSERVER_EMAIL
to specify the sender everything started working:Now I'm receiving emails on 500 errors.