问题描述
我正在使用Apache在Ubuntu上运行一个站点,并使用PHP和Zend Framework.
I am running a site on Ubuntu with Apache and using PHP and Zend Framework.
我希望将异常信息通过电子邮件发送给开发人员,并想知道这样做的好方法.我不想立即通过电子邮件发送每个例外情况,因为如果发生重大事件,我们的收件箱将被淹没.
I would like exception information emailed to the devs and am wondering about a good way to do this. I don't want to email every single exception right away because if something major happens, our inboxes will get flooded.
相反,我正在寻找一种方式,可以将过去一小时的异常和错误一次全部通过电子邮件发送(不超过一定的大小限制).我正在考虑编写一个cron脚本来解析Apache的error_log,但是也许有比这更简单的方法.
Instead, I am looking for a way that the exceptions and errors from the past hour can be emailed all at once (up to a certain size limit). I am thinking about writing a cron script to parse Apache's error_log but perhaps there are easier ways than doing that.
推荐答案
我建议Hoptoad: http://hoptoadapp.com/pages/home
I'd recommend Hoptoad: http://hoptoadapp.com/pages/home
这篇关于通过电子邮件发送例外的好方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!