R – tracing and how should it be done

log4netnettrace

What is tracing and how should it be done?

I have a common utilities library I am including in my projects and I want to be able to get some output from it. I have been using log4net but would rather not have my common utilities library dependent upon log4net. Does that make sense?

Edit:
Is there any correlation between logging and tracing? Would I want to put tracing and logging into the same stream for some reason?

Should I perhaps replace some of the log4net Logger.Debug(..) I have in my projects with System.Diagnostics.Trace.WriteLine(..)s?

Best Answer

Here are some blog posts by Mike Rousos of the .NET BCL team: