Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Symfony2 项目中使用 Monolog,我已经厌倦了看到由于拒绝访问和其他一些我不感兴趣的情况而发生的异常电子邮件(有自动请求导致这种情况)。
有没有办法为 Monolog 指定一个回调,根据我是否要通过电子邮件发送它返回真/假?
据我所知,您必须覆盖 ExceptionListener 并控制您的手。在此覆盖过程之后,您可以发送您想要通过电子邮件发送的内容。