Programming, error messages and sample code

How to enable the WCF Tracing

Programming, error messages and sample code

WCF tracing is built on top of System.Diagnostics. To use tracing, you should define trace sources in the configuration file or in code.   
<configuration>
   <system.diagnostics>
      <sources>
            <source name="System.ServiceModel" 
                    switchValue="Information, ActivityTracing"
                    propagateActivity="true">
            <listeners>
               <add name="traceListener" 
                   type="System.Diagnostics.XmlWriterTraceListener" 
                   initializeData= "c:\log\Traces.svclog" />
            </listeners>
         </source>
      </sources>
   </system.diagnostics>
</configuration>
  For more, see https://msdn.microsoft.com/en-us/library/ms733025(v=vs.110).aspx