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.

Comments

Popular posts from this blog

Maven Crash Course - Learn Power Query, Power Pivot & DAX in 15 Minutes

"Data Prep & Exploratory Data Analysis" course by Maven Analytics

Oracle Cloud Infrastructure 2024 Generative AI Professional Course & Certification Exam (1Z0-1127-24)