Elmah - 频率上限/限制#errors 在给定的时间间隔内记录
正在考虑实施 Elmah,但无论如何我都看不到限制记录的错误数量(如果错误数量超过某个阈值)?
基本上考虑这样一个场景:某些自动化过程(无意的或恶意的)在短时间内生成大量错误。
我们将记录到数据库(可能是 MySQL),而不是发送电子邮件,但无论如何都看不到任何信息来设置任何最大限制 - 理想情况下,我想在 5 分钟间隔内说 x 千,而不是仅仅依赖于崩溃我的数据库连接错误。 我们记录错误的服务器可能还会运行一些其他服务/功能,如果生成大量错误,我们不想丢失这些服务/功能
,这是其他人已经考虑/解决的问题,还是实际上阈值如此之高,以至于无关紧要? 我想如果您保留错误报告,这将是至关重要的?
Looking at implementing Elmah but I cant see anyway to limit the number of errors logged if they rise above a certain threshold?
Basically thinking about a scenario where some automated process (unintended, or malicious) generates a ton of errors in a short period of time.
We will be logging to a db (probably MySQL), rather than sending emails, but couldnt see any info on anyway to set any max limits - ideally I'd like to say x thousand in 5 min interval rather than just rely on crashing my error db connection.
The server we log errors to will probably also run a few other servioces / functions we wont want to lose should a ton of errors get generated
Is this something others have considered / solved, or ius the threshold effectively so high it is irrelevant?
I imagine it would be vital if you leave the error reporting on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些是我能找到的最接近的东西......
并且< a href="https://gist.github.com/991068" rel="nofollow">这里是通过 ELMAH 记录器的子类执行此操作的示例:
These are the closest things I could find...
And here is an example of doing it via subclass of the ELMAH logger: