Reading/writing ELMAH log information from/into a custom table

若如初见. 提交于 2019-12-08 08:53:57

问题


I've been experimenting with ELMAH to use it for my new MVC project. Is there any way I can use custom database schema for error logging? Also how I can customize the information displayed in the elmah.axd page?


回答1:


I wouldn't attempt to customize the elmah.axd page. I'd just create my own page that queried the data out of the database directly. It's going to be much easier. The source code even includes some samples of this.

However, if you want to change the table name or change the names of the fields you'll have to customize the stored procedures the SQL provider uses: ELMAH_GetErrorsXml, ELMAH_GetErrorXml, and ELMAH_LogError. You can also add additional fields to the ELMAH SQL table, if necessary.



来源:https://stackoverflow.com/questions/10086638/reading-writing-elmah-log-information-from-into-a-custom-table

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