To enable the wcf trace we need to mention the trace source in configuration file like Web.config. Mostly and widely used trace source is System.ServiceModel. Another trace source which is mostly used for WCF Message logging is System.ServiceModel.MessageLogging.
WCF tracing provides us different wcf tracing levels as given below:
Sr. No |
Trace Level |
Event Category |
Tracing Details |
Traced Events |
1 |
Off |
- |
– (No Tracing) |
Ignores tracing. |
2 |
Critical |
Negative Events |
Unexpected events or any error condition. When occurs, application may shut shortly or immediately. |
All unexpected events
OutOfMemoryException
ThreadAbortException
StackOverFlowException
ConfigurationErrorsException
SEHException
Application start errors
System Hang errors
All other traces that cause application to terminate |
3 |
Error |
Negative Events |
Unexpected events or any error condition. When occurs, application does not shut, it remains up & continues processing. |
Traces all exceptions. |
4 |
Warning |
Negative Events |
Indicates possibility of problems. Application remains up and continues the processing. |
Traces all possible problems that are occurred or may occur.
1) TimeOut has exceeded
2) Rejected credentials
3) Receiving more request than expected.
4) Receiving Queue is nearby maximum capacity. |
5 |
Information |
Positive Events |
Only informative traces that tells the successful milestone of application execution. |
Traces all diagnostic data. |
6 |
Verbose |
Positive Events |
Same as “Information”, however only difference is – it allows low level tracing. |
Mostly used for Debugging purpose. |
7 |
ActivityTracing |
- |
The traces are related to communication between components and activities. |
- |
8 |
All |
Positive & Negative |
It includes all above events |
It includes all above events |