<diagnostics>
The diagnostics element defines settings that can be used by an administrator for run-time inspection and control.
Schema Hierarchy
<system.serviceModel>
<diagnostics>
Syntax
<system.serviceModel>
<diagnostics etwProviderId=”String” performanceCounters="Off/ServiceOnly/All/Default" wmiProviderEnabled="Boolean" > <endToEndTracing activityTracing="Boolean"
messageFlowTracing="Boolean"
propagateActivity="Boolean" />
<messageLogging logEntireMessage="Boolean"
logMalformedMessages="Boolean"
logMessagesAtServiceLevel="Boolean"
logMessagesAtTransportLevel="Boolean"
maxMessagesToLog="Integer"
maxSizeOfMessageToLog="Integer" >
<filters>
<clear />
</filters>
</messageLogging>
</diagnostics>
</system.serviceModel>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute | Description |
---|---|
etwProviderId |
A string that specifies the identifier for the Event-Tracing provider, which writes events to ETW sessions. |
performanceCounters |
Specifies whether performance counters for the assembly are enabled. Valid values are
|
wmiProviderEnabled |
A Boolean value that specifies whether the WMI provider for the assembly is enabled. The WMI provider is required for user to gain run-time access to the inspection and control features of Windows Communication Foundation (WCF). The default is false. |
Child Elements
Element | Description |
---|---|
A configuration element that allows you to enable and disable different aspects of end-to-end tracing during the running of a service application. |
|
Describes the settings for WCF message logging. |
Parent Elements
Element | Description |
---|---|
serviceModel |
The root element of all WCF configuration elements. |
Remarks
The diagnostics section defines the diagnostics settings for all services located in an assembly. It is not possible to define separate diagnostics settings at the service level unless there is only one service in the assembly. Attributes are set according to the requirements of the section.
Example
<diagnostics wmiProviderEnabled="false"
performanceCounters="all">
<messageLogging logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog="42"
maxSizeOfMessageToLog="42">
<filters>
<clear />
</filters>
</messageLogging>
</diagnostics>