D
Daniel Billingsley
The documentation on this subject seems to give you 98% of what you need to
know. From various sources, I have compiled an understanding that this
should work:
<configuration>
<system.diagnostics>
<switches>
<add name="clientswitch" value="3" />
</switches>
<trace autoflush="true" indentsize="0">
<listeners>
<add name="traceListener" type="System.Diagnostics.TextWriterTraceListener,
system version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" initializeData="TraceLog.txt" />
</listeners>
</trace>
</system.diagnostics>
</configuration>
(Pardon the formatting, hard to get it pretty with plain text ya know)
When I execute this line in my code:
Trace.WriteLine("Starting client Form1");
I get a ConfigurationException which says "Couldn't find type for class
System.Diagnostics.TextWriterTraceListener, system version=1.0.5000.0, "
etc. (the whole fqn from the config file is shown).
I can't find an actual fully working example on gotdotnet or msdn, and like
I said the documentation just points you in the general direction but
doesn't really give you the complete answer.
Is there anybody that has this working and can give me some pointers?
know. From various sources, I have compiled an understanding that this
should work:
<configuration>
<system.diagnostics>
<switches>
<add name="clientswitch" value="3" />
</switches>
<trace autoflush="true" indentsize="0">
<listeners>
<add name="traceListener" type="System.Diagnostics.TextWriterTraceListener,
system version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" initializeData="TraceLog.txt" />
</listeners>
</trace>
</system.diagnostics>
</configuration>
(Pardon the formatting, hard to get it pretty with plain text ya know)
When I execute this line in my code:
Trace.WriteLine("Starting client Form1");
I get a ConfigurationException which says "Couldn't find type for class
System.Diagnostics.TextWriterTraceListener, system version=1.0.5000.0, "
etc. (the whole fqn from the config file is shown).
I can't find an actual fully working example on gotdotnet or msdn, and like
I said the documentation just points you in the general direction but
doesn't really give you the complete answer.
Is there anybody that has this working and can give me some pointers?