tags:

views:

223

answers:

2

Just got ELMAH running, and so far it seems great. I am wondering two things:

  1. I am using ELMAH from multiple applications, all logging to the same table in MSSQL. Will I be able to drop the .axd file in any project to browse all the logs, or will I need a custom solution? (The latter seems more likely, so I can have filtering options, but I'm just trying to verify.)

  2. Is elmah.axd somehow customizeable? I'd rather modify it than write my own, so that I could add the ApplicationName column to its listing.

A: 

ELMAH, by default, is set up to figure out under which application it is running and will filter the displayed errors based on that application. So, as for your question 1, no, you won't be able to call the .axd from an app and see the errors for all apps. At least not without some extra work. See also this related question.

As for question 2, the default viewer is not designed to be "customized". By that, I mean there aren't any markup parameters you can give it to change the columns it displays. ELMAH itself is open source, though, so you can easily download the source and build a customized version. I would start by having a look at ErrorLogPage.cs, which is the class that "Renders an HTML page displaying a page of errors from the error log."

Eric King
Thanks for the info. I'll probably end up writing a custom view, since we (definitely, now) want to sort by application.
Habaabiai
I blogged about what I did to use ELMAH with multiple applications here: http://blog.devadept.com/2010/02/using-elmah-with-multiple-applications.html
Eric King
+1  A: 

We just released our ELMAH based exception reporting solution on codeplex: http://aspexceptionreporter.codeplex.com/

One of the features is that it logs errors of multiple web sites to a central location. The project includes a web site to view and search through the errors.

Mel Gerats