B
Brad Wood
I've used tracing before, but today I've tried everything and can't get
a simple sample working.
This is my app config (I've also tried specifying a fully qualified type
name for the type attribute of the add element):
<configuration>
<system.diagnostics>
<trace autoflush="false">
<listeners>
<add name="bob"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="E:\log.txt" />
</listeners>
</trace>
</system.diagnostics>
</configuration>
I've added the #define DEBUG directive to the only code file in my
project. When I run the app and examine the Listeners collection, there
is only the one DefaultTraceListener, no TextWriterTraceListener.
I can't figure out why...
a simple sample working.
This is my app config (I've also tried specifying a fully qualified type
name for the type attribute of the add element):
<configuration>
<system.diagnostics>
<trace autoflush="false">
<listeners>
<add name="bob"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="E:\log.txt" />
</listeners>
</trace>
</system.diagnostics>
</configuration>
I've added the #define DEBUG directive to the only code file in my
project. When I run the app and examine the Listeners collection, there
is only the one DefaultTraceListener, no TextWriterTraceListener.
I can't figure out why...