Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已设置 elmah 以在我的 SQL 服务器上记录异常。如果 SQL 服务器出现故障,是否有任何方法可以定义回退机制。如果 sql 服务器无法访问,我希望 elmah 开始记录到 xml 文件。知道怎么做吗?
Elmah 还不支持回退或并发日志记录位置。
如果 Elmah 无法访问数据库以记录异常怎么办?
我发布了一个复合错误日志,它正好解决了这个问题。 您可以通过Nuget安装它或将其从源代码复制到您的项目中。
我在这里的回答中有更多详细信息。