Topic: WCF Tracing
Hello,
I recently read a blog entry about WCF Tracing logging through smartinspect. However, i need to route the specified entries to a file rather than directly to the console. I tried to use the initializeData attribute of the Listener, but it didn't work. The configuration i use is the following:
<configuration>
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Warning" propagateActivity="false">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default">
<filter type="" />
</add>
<add name="ServiceModelTraceListener">
<filter type="" />
</add>
<add name="SmartInspect">
<filter type="" />
</add>
</listeners>
</source>
</sources>
<sharedListeners>
<add initializeData="Logs\exray_workflowEngine_traces.svclog"
type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelTraceListener" traceOutputOptions="DateTime, Timestamp">
<filter type="" />
</add>
<add initializeData="Logs\exray_workflowEngine_traces.sil" name="SmartInspect" type="Gurock.SmartInspect.DebugTrace.SmartInspectTraceListener,Gurock.SmartInspect.DebugTrace" />
</sharedListeners>
</system.diagnostics>
<system.serviceModel>
<diagnostics performanceCounters="All">
<messageLogging logEntireMessage="true" logMalformedMessages="true"
logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true"
maxMessagesToLog="100000" maxSizeOfMessageToLog="1000000" />
</diagnostics>
</system.serviceModel>
</configuration>
The first listener works ok.
Thank you in advance.
