Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ELMAH vs Enterprise Library Exception Handling Block

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?

like image 947
Ryan Shripat Avatar asked Jun 02 '09 17:06

Ryan Shripat


2 Answers

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.

like image 57
Rick Glos Avatar answered Nov 07 '22 07:11

Rick Glos


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.

like image 6
Andrew Hare Avatar answered Nov 07 '22 06:11

Andrew Hare