Recommended Settings for a Production Environment
<configuration> <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Warning" propagateActivity="true" > <listeners> <add name="xml"/> </listeners> </source> <source name="myUserTraceSource" switchValue="Warning, ActivityTracing"> <listeners> <add name="xml"/> </listeners> </source> </sources> <sharedListeners> <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\logs\Traces.svclog" /> </sharedListeners> </system.diagnostics> <system.serviceModel> <diagnostics wmiProviderEnabled="true"> </diagnostics> </system.serviceModel> </configuration>
Recommended Settings for Deployment or Debugging
<configuration> <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true" > <listeners> <add name="xml"/> </listeners> </source> <source name="System.ServiceModel.MessageLogging"> <listeners> <add name="xml"/> </listeners> </source> <source name="myUserTraceSource" switchValue="Information, ActivityTracing"> <listeners> <add name="xml"/> </listeners> </source> </sources> <sharedListeners> <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\logs\Traces.svclog" /> </sharedListeners> </system.diagnostics> <system.serviceModel> <diagnostics wmiProviderEnabled="true"> <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000" /> </diagnostics> </system.serviceModel> </configuration>