I have a certain framework of code, and I have a TraceListener defined for two reasons:
- Back-compatibility with a lot of the old logging that was done via Trace.Write until we update it, and
- It's nice to be able to instrument the other assemblies our code references if we need to.
However, I have one assembly (not ours) that logs a lot of pointless data that doesn't help us debug anything. How can I turn off tracing for this one assembly (or, alternately, the facade project we built around it), while leaving it on for the rest of the application?
I've tried various flavors of configuration in our facade project, usually looking like the following, to no avail. I've tried adding <remove>
elements that match the <add>
elements which setup the logging in the first place, tried <clear>
ing them, setting <trace enabled="false">
and at least three other attempts. Thanks for any help you can provide!
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<clear/>
</listeners>
</trace>
<switches>
</switches>
</system.diagnostics>