What are Trace Listeners and Trace Switches?
Trace listeners are objects that are used to receive store and route tracing information. The trace listener decides the final destination where the tracing information is routed to. There are 3 types
Default, TextWriter and EventLog
Trace switches are used to define behavior of Trace Listeners.
Example:
<configuration>
<system.diagnostics>
<switches>
<add name="DataMessagesSwitch" value="0" />
<add name="TraceLevelSwitch" value="0" />
</switches>
</system.diagnostics>
</configuration>
both switches are off, to turn them on , replace 0 by 1.