Adds some extra features to old-style (pre-.NET 2.0) diagnostics.
Inheritance Hierarchy

CleanCode.Diagnostics StructuredTrace
Namespace: CleanCode.Diagnostics
Assembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
Syntax
Remarks
This class leverages the powerful Trace facilities
of .Net, adding a wrapper that conditionalizes the output.
Additionally, the string that you pass to WriteLine(String)
is adorned with the thread name and the current date/time.
The Trace facility uses information in the system.diagnostics section of your app.config file. Here's an example showing 3 switches and a listener.
<system.diagnostics> <switches> <add name="main" value="0" /> <add name="thread" value="0" /> <add name="smarttip" value="0" /> </switches> <trace autoflush="true" indentsize="4"> <listeners> <add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:/usr/tmp/mylog.log" /> <remove name="Default" /> </listeners> </trace> </system.diagnostics>
BooleanSwitch mainSwitch = new BooleanSwitch("main", "general tracing");
Since CleanCode 0.9.07.
See Also