In the previous question we have specified switch value as information. This value indicates what type and level of tracing information you want to record. Below is the list of the same.
Trace Level | Description |
Off | Ignore all trace messages |
Critical | Log unexpected processing events or unhandled exceptions have occurred. The application will terminate immediately or shortly. |
Error | An unexpected processing event or exception has occurred. The application is still capable of continuing its processing. |
Warning | Indicates there is a possible problem but the application will continue running. |
Information | Application is running smoothly only that informative message is recorded. In this case messages are just milestones. |
Verbose | Very similar to information but provides more details as compared. |
ActivityTracing | In this case messages are related to communication between components and the activities. |
All | In this case all messages are captured. |
Trace level value is specified in ‘source’ tag in switch value. For instance the below ‘web.config’ snippet indicates the trace type as ‘Information’.
<system.diagnostics>
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing">
............
............
............
............
Asked In: Many Interviews |
Alert Moderator