Separate viewer application for ELMAH's log

无人久伴 提交于 2019-12-03 07:22:26

问题


We're using ELMAH for error logging in our ASP.NET application. We use the SQL Server error logging. Because of security and configuration constraints in the application, we would like to have the log viewer UI (Elmah.ErrorLogPageFactory) in a separate web application, connected to the same database.

However, ELMAH filters errors on application name, so just deploying a separate application, you also get a separate log. Is there a way to configure ELMAH to work as a standalone log viewer, i.e. display the log messages from a different application?


回答1:


You can override the application name in the config like this...

<elmah>
  <errorLog type="..." applicationName="YourApplicationName" />
</elmah>

You could either just give your viewer application the existing name of the application that you want to monitor, or specify the same custom name in both config files.



来源:https://stackoverflow.com/questions/589996/separate-viewer-application-for-elmahs-log

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!