<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8211560\x26blogName\x3dTech+Tips,+Tricks+%26+Trivia\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://mvark.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://mvark.blogspot.com/\x26vt\x3d601588505461698440', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
An architect's notes, experiments, discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks

Diagnostics and Logging in ASP.NET

Key points from K. Scott Allen's article :

The ability to record and retrieve diagnostic information is an important characteristic of robust software. Diagnostic information could include the amount of time needed to execute a critical method, the number of transactions committed per second, or the number of users currently with active sessions.

The three keys to successful diagnostics include:
1) Making a list of requirements.
2) Matching those requirements to the available diagnostic and logging features.
3) Implementing a layer inside your software to make logging flexible, configurable, and effective.

Strategies to choose from:
  • ASP.NET Tracing - ASP.NET has built in tracing capabilities at the Page and Application level
  • Performance Counters - great place for your application to expose high frequency events
  • Event Log - can be both a source and a destination for diagnostic information. Not well suited for high frequency events.
  • Web Logs - useful for retrieving information about file not found errors among other things.
  • Email, Files, and Databases - Other places to write diagnostic information besides event log and performance counters
  • Logging & Diagnostic Software - log4net or Logging Application Block from Microsoft.


Tweet this | Google+ it | Share on FB

« Home | Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »


Post a Comment