views:

1228

answers:

5

My team is currently in the process of building an ASP.NET MVC application, and we're trying to decide which of these frameworks to implement to deal with error handling and logging.

What are the reasons for choosing one of these over the other?

+3  A: 

ELMAH is simple, easy to use, and easy to implement. EntLib is big, "enterprisey", and powerful. In your case, based on the little I know about your situation, I would hesitate to recommend anything. However if I had to pick one for you I would say ELMAH for the reasons stated.

Andrew Hare
Is there any information I can provide that will make your recommendation easier ? - Thanks
Ryan Shripat
What kind of application will this be? Do you need exception policy management or just exception logging?
Andrew Hare
+3  A: 

Personally, I've been using Enterprise Library for a number of our clients and I have yet to use ELMAH. Here's my thoughts on Ent Lib.

  • It will take you a bit to get up to speed with Ent Lib - it's not a 5 second install and start using it thing.
  • There's alot of configuration to do in the app.config/web.config file just to make it work. That said, once you understand it, it easier on other projects.
  • You must implement the Logging Block, not just the Exception Handling Block to log the information somewhere (event log, flat file, database, etc.)
  • It's not just for logging exceptions. For example, many of our clients want to get log events for when a user logs in or logs out of an application.
  • You can use the configuration file to change how logging works depending on the environment (i.e. Log exceptions for Production, log everything for Dev, etc.).
  • It's not just for web, but for all kinds of applications.

A cursory glance at ELMAH leads me to believe that it's a great way to get something up quick. Longer term, you may want something with additional power.

Rick Glos
+1  A: 

I may be off base here, which is quite often the case, but EntLibrary is meant to help develop exception handling whereas ELMAH is jsut going to show you when and where exceptions occured. If you just want a report of exceptions use ELMAH, if you need more power EntLib.

Kyle West
A: 

That's awesome! Thanks

Vincent
+2  A: 

Also, Elmah is designed specifically for capturing and logging unhandled exceptions. It can be configured to log caught exceptions, but that is a recent addition and not its primary purpose.

jules