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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s