I\'m new with TraceSource so I\'m doing some investigation into how it can/ can\'t be used (basically pros and cons).
Something I do like is that I can get dumps from wi
Found the problem, a complete noob mistake, both my TraceSource items have a Listener which is writing to the same file. Although I'm not sure exactly the error, but it'd be some kind of clash when writing.
If you want to have multiple sources using the same listener you need to use the <sharedListeners />
like this:
<system.diagnostics>
<trace autoflush="true" />
<sources>
<source name="MyCustomTracer"
switchValue="Information, ActivityTracing">
<listeners>
<add name="sdt" />
</listeners>
</source>
<source name="System.Net"
switchValue="Information, ActivityTracing, Critical">
<listeners>
<add name="sdt" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="sdt"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData= "traceOutput.log" />
</sharedListeners>
</system.diagnostics>