I have the following config file:
<system.diagnostics>
<trace autoflush="true" indentsize="1" >
<listeners>
<add name="dbgTrace" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\MyLogs\MyApp\Logs\LogFile.log" />
</listeners>
</trace>
</system.diagnostics>
So I can read the tracelisteners collection like this:
TraceListenerCollection tlc = System.Diagnostics.Trace.Listeners;
and get the TraceListener from it, but the problem is, that I can not access initializeData property. There are only Name, Type, IndentLevel as public properties.
Is there any workaround?