tags:

views:

16

answers:

1

I noticed recently that ELMAH has support for exporting details of an exception via JSON and XML. Out of sheer curiosity, why would anyone use this?

If I was storing my data in a SQL DB, why not retrieve the value from there? Additionally, the errors are stored in a pseudo xml format already... why export something that's already in xml to xml?

Just wondering...

A: 

The JSON and XML export features were added to enable and encourage anyone to develop a client to ELMAH using simply HTTP for access rather than relying on the choice of back-end storage. A client can be, for example, written to provide alternative and richer views (dashboards or using Ajax) in addition to the built-in ones, perform analytics, full-text search and more.

A basic client would need to take one or more “home” URLs of ELMAH deployments and build a TOC of the log. This is easily done by simply downloading the CSV off the home URL. Each record in the CSV provides a URL to the detailed entry, which in turn can be used to get the full details of an error in XML or JSON.

Atif Aziz