tags:

views:

37

answers:

1

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.

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.

A: 

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.

Here is quite a nice article about elmah.

Stefan Egli
I came to the same conclusion much later last night after asking this question. All data access is through one point, and if that point fails, it will shut down the request and redirect straight to the error page, no logging.
ProfK