January 2012 Entries

Hi, it's really handy to be able to add Trace to your .Net application using the System.Diagnostics.Trace class.

The only problem is how the heck do you get it to Trace out at runtime?

The simple solution is to add this to your app config file...

    <trace autoflush="true">
        <add name="textwriterListener" type="System.Diagnostics.TextWriterTraceListener"
          initializeData="c:\temp\outfile.txt" traceOutputOptions="ProcessId, DateTime"/>