怎么做,如果ELMAH不能达到记录异常的数据库? [英] What to do if Elmah can't reach the database to log an exception?

查看:172
本文介绍了怎么做,如果ELMAH不能达到记录异常的数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OK,显然相关的问题不似乎直接解决这个问题。例外达到ELMAH,也许库不能达到一个数据库,但也不能达到ELMAH该数据库。即使他们针对不同的服务器,也许它的网络问题。

OK, apparently related questions dont seem to address this directly. An exception reaches Elmah, maybe a repository cant reach a database, but then neither can Elmah reach that database. Even if they target different servers, maybe its a network problem.

有没有配置备用ELMAH日志中这样的,例如案件的一种方式一个文本文件,消息队列,电子邮件,短信等?如果是这样,我从哪里开始寻找对于现在的ELMAH源$ C ​​$ C为此,excpt。

Is there a way to configure fallback logs for Elmah for cases like this, e.g. a text file, message queue, email, sms, etc? If so, where do I start looking to do this, excpt for now the Elmah source code.

推荐答案

我通常不那么关心的是:如果数据库未运行,那么我的应用程序没有运行,我没有例外反正日志。但是,如果这是你,那么你可以考虑使用 XmlFileErrorLog 的问题。

I am usually not so concerned about that: If the DB is not running then my application is not running and I have no exceptions to log anyway. But if this is an issue for you then you could consider to use the XmlFileErrorLog.

据我可以告诉你不能使用一个以上的日志目标,并没有什么像一个回退。但是,您可以配置电子邮件通知,但你会得到通过电子邮件的所有异常也是如此。

As far as I can tell you cannot use more then one log destination and there is nothing like a fallback. You could however configure email notifications, but then you would get all exceptions by email as well.

下面是一个相当约ELMAH好的文章

这篇关于怎么做,如果ELMAH不能达到记录异常的数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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