Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is tracing and how should it be done?

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?

like image 822
Xerx Avatar asked Oct 18 '25 15:10

Xerx


1 Answers

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

  • A Tracing Primer – Part I - is a simple introduction to the tracing APIs.
  • A Tracing Primer – Part II (A) - talks mainly about filtering events
  • A Tracing Primer – Part II (B) - talks about developing custom trace listeners (plugins that will channel your trace events to wherever you desire).
  • A Tracing Primer – Part II (C) - talks about how the configuration files are interpreted.
like image 158
Mark Cidade Avatar answered Oct 21 '25 05:10

Mark Cidade



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!