ELMAH SQL错误处理程序数据库不可用 - 记录发生了什么? [英] ELMAH SQL Error Handler database not available- what happens to logging?

查看:116
本文介绍了ELMAH SQL错误处理程序数据库不可用 - 记录发生了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试ELMAH,并故意关闭我的应用程序中的ELMAH日志的数据库连接,以查看如果数据库不可用会在生产中发生什么。

I'm testing ELMAH and have deliberately turned off the database connection for the ELMAH log in my application to see what will happen in production if the DB isn't available.

似乎ELMAH无法捕获自己的错误 - 当SQL数据库日志失败时,AXD文件不可用。

It seems that ELMAH can't trap its own errors- the AXD file isn't available when the SQL databse log fails.

如果发生这种情况,如何诊断我的错误?

How can I diagnose my errors if this occurs?

推荐答案

不是真的确定ELMAH,但这种日志框架的预期行为是不抛出任何异常,如果他们的错误。也就是说如果ELMAH的数据库关闭,我会假设它只是不记录错误到数据库。

Not really sure about ELMAH but expected behaviour of such logging frameworks is not to throw any exceptions if something goes wrong with them. I.e. if ELMAH's database is down I'd assume it will just not log the errors to database.

如上所述,您可以/应该使用替代汇 - 电子邮件或平面文件。

As suggested above you can/should use alternative sinks - email or flat file.

这篇关于ELMAH SQL错误处理程序数据库不可用 - 记录发生了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆