A Mutable Log

A blog by Devendra Tewari


Project maintained by tewarid Hosted on GitHub Pages — Theme by mattgraham

Debug Logging in .NET

This post provides useful references for tackling debug logging in .NET. It does not delve deeply into any of them.

Most Java developers are familiar with and routinely use Log4J from Apache Foundation. In fact, Log4J used to be the single big cause of package incompatibility in the Java world. Several Java libraries have been ported over to the .NET world. Log4J is one of them, its .NET equivalent is Log4Net.

If your company makes using open source components exceedingly difficult, .NET has the built-in Debug and Trace classes in System.Diagnostics package. Use TraceSwitch to determine log level. Use TraceListener or any of its subclasses to determine where the log output should go.