Tracing in Windows Communication Foundation
Tracing mechanism in Windows Communication Foundation is based on the classes that resides in System.Diagnostic namespace.Important classes are Trace, TraceSource and TraceListener. Following are the steps to enable tracing in WCF : 1. Configuring WCF to emit tracing information/Define Trace Source , we have the following options: System.ServiceModel System.ServiceModel.MessageLogging System.ServiceModel.IdentityModel System.ServiceModel.Activation System.Runtime.Serialization System.IO.Log Cardspace In configuration file, we will define a source to enable this configuration as follows: 2. Setting Tracing Level , we have the following available options, we need to set this tracing level to available options other than default "Off": Off Critical Error Warning Information Verbose ActivityTracing All In configuration file, we can choose above values for switchValue attribute as follows: