Do you implement trace logging (with Log4Net)?

Last updated by Igor Goldobin about 2 months ago.See history

By using logging, the developer has access to more information when a particular error occurs like which functions were called, what state is the application currently in and what certain variables are. This is important as a simple stack trace will only tell you where the error occurred but not how it occurred.

Log4Net is an open-source logging library for .NET based on the Log4J library. It provides a simple to use library to enable logging in your application. It provides several logging options such as:

  • XML File (Recommended)
  • Text File
  • Database
  • Rolling log file
  • Console

Log4Net also provides different levels of tracing - from INFO to DEBUG to ERROR - and allows you to easily change the logging level (through the config file)

We have a program called SSW CodeAuditor to check for this rule.

We open source. Powered by GitHub