I have a WPF C# app. I have a config file in the same folder as the exe
myapp.exe.config
I have a traceswitch defined thus
<configuration>
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="traceListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="TextWriterOutput.log" />
<remove name="Default" />
</listeners>
</trace>
<switches>
<add name="traceSwitch" value="4" />
</switches>
</system.diagnostics>
</configuration>
However, the little love won't pick up it's setting form the config file.
Any ideas what I am doing wrong? Driving me mental.
private static TraceSwitch traceSwitch = new TraceSwitch("traceSwitch", "My Trace Switch");
myapp.exe.config
I have a traceswitch defined thus
<configuration>
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="traceListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="TextWriterOutput.log" />
<remove name="Default" />
</listeners>
</trace>
<switches>
<add name="traceSwitch" value="4" />
</switches>
</system.diagnostics>
</configuration>
However, the little love won't pick up it's setting form the config file.
Any ideas what I am doing wrong? Driving me mental.
private static TraceSwitch traceSwitch = new TraceSwitch("traceSwitch", "My Trace Switch");
Comment