<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 wmiProviderEnabled="Boolean"
performanceCounters="Off/ServiceOnly/All/Default">
<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 |
---|---|
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. |
performanceCounters |
Specifies whether performance counters for the assembly are enabled. Valid values are
|
Child Elements
Element | Description |
---|---|
messageLogging |
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>
See Also
Reference
DiagnosticSection
System.ServiceModel.Diagnostics
© 2007 Microsoft Corporation. All rights reserved.
Last Published: 2010-01-05