问题
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