locked
Logging Application Block vs Health Monitoring RRS feed

  • Question

  • User-209105085 posted

    Microsoft enterprise library comes with logging application blocks which can be used to log errors, information to different locations. ASP.NET 2.0 or latter also comes with Health Monitoring system which is highly configurable through web.config and can be used to log web events to different locations.

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p> Can someone answer the following questions?<o:p></o:p>

    1>     Which one is better for ASP.NET applications?

    2>     If I’m using Trace.Write() in asp.net application then is it possible to configure health monitoring system so that Trace.Write() will write to database.

     

    Where can I find detailed comparison between these technique.

    Thursday, May 22, 2008 12:00 PM

Answers

  • User-2074625069 posted

    Health Monitoring:

    I think all you need to do is use the SqlWebEventProvider to log event details to a SQL Server database including Trace information.

    How Do I: Implement Health Monitoring for an ASP.NET Application?
    http://www.asp.net/learn/videos/video-195.aspx

    How Do I: Implement a Custom Health Monitoring Event?
    http://www.asp.net/learn/videos/video-237.aspx

    Some info i found while trying to find the answer to the same question:

    "One question that comes up with health monitoring is when to use health monitoring and when to use a tool like the Logging and Instrumentation block in Enterprise Library. If you have to provide logging and instrumentation outside of an ASP.NET web application or web service, obviously the block is the solution. Inside of ASP.NET, health monitoring is certainly easy to use and extend, so I wouldn’t see a need to pull in enterprise library for the sole purpose of adding logging functionality. "
    ~
    Health Monitoring in ASP.NET 2.0 - K. Scott Allen Blog Post
    http://odetocode.com/Blogs/scott/archive/2005/11/01/2402.aspx

    "I was about to use the Logging Application Block of the Enterprise Library 2.0  when I found out about the built in Health Monitoring feature in ASP.net 2.0. IMHO, the Logging block is great for an enterprise app but might be overkill for smaller apps."
    ~
    Health monitoring in asp.net 2.0 - logging events - Raj Kaimal  Blog Post
    http://weblogs.asp.net/rajbk/archive/2006/02/09/437846.aspx

    What did you use in the end, ent lib or healtn monitoring?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 17, 2008 6:30 AM