Is it possible to programmatically switch error log providers with ELMAH?
Posted
by
Ralph Lavelle
on Stack Overflow
See other posts from Stack Overflow
or by Ralph Lavelle
Published on 2012-03-19T23:26:11Z
Indexed on
2012/03/19
23:30 UTC
Read the original article
Hit count: 275
error-handling
|elmah
Is it possible to switch from using the XML provider to SQL Server using ELMAH?
I need to investigate this option because of the fallibility of our SQL Server where our ELMAH errors are stored. I want to be able to fail gracefully and continue logging to XML if the server fails.
I can see that programmatic connection string switching is possible, and I see that ELMAH Issue 149 announces the programmatic configuration of default error log, but I can't actually see any code examples anywhere, so I'm not too sure if this is possible. I'm guessing it is, in which case does anyone know for sure?
My question is similar to this one, except that I want to try and log errors to SQL Server, and if that fails switch to XML, not log to all stores all the time.
© Stack Overflow or respective owner