.Net - What are Trace switches? Describe how to create and use Trace
switches. - June 03, 2009 at 11:00 AM by Shuchi Gauri
What are Trace switches? Describe how to create and use Trace switches.
Trace switches allow us to filter, enable/disable the outputs through Trace. We
can configure them through the config file. 3 types of trace switches:
BooleanSwitch: Enable/Disable trace statements.
TraceSwitch and SourceSwitch: used for trapping particular Trace levels.
BooleanSwitch dataSwitch =
new BooleanSwitch("Comment", "module1");
TraceSwitch generalSwitch =
new TraceSwitch("comment", "module1");
Also read
Debug.Write: Debug Mode, Release Mode (used while debuging a
project)..............
What is Break mode?, What are the options for stepping through code?, What is a
Breakpoint?, Define Debug and Trace Class, Explain how to configure Trace
switches in the application's .config file, What are Trace
switches?................
What is break mode? What are the options to step through code?, Debug Vs Trace,
Define trace class, Define Listeners collection of Trace and Debug objects,
Define Trace Switches..................
Both are used to help programmers find errors, occurring events and flow of
code..........
|