Delen via


Configure Diagnostic Tracing and Message Logging Dialog Box

Use the Configure Diagnostic Tracing and Message Logging dialog box to configure WCF and WF tracing levels, and message logging options, at the server, site, or application level. With this dialog you can configure legacy System.Diagnostics monitoring functionality. When System.Diagnostics is configured, a svclog file is created, which is consumed by the SvcTraceViewer tool. This promotes additional integration with Windows Server AppFabric and its troubleshooting features.

The WF and WCF tracing levels are defined in increasing order of verbosity; Off, Critical, Error, Warning, Information, and Verbose. The more verbose the option, the more information is written to the trace log which can aid in the process of isolating a problem. However, with the increase in verbosity comes a corresponding decrease in performance.

Dialog Fields

Tracing

Field

Description

WCF tracing level

Select the tracing level for WCF messages. On load, this field is set to the Verbosity Level (switchValue) if a source name="System.ServiceModel" is detected in the element.

Workflow tracing level

Select the tracing level for Workflow tracing. On load, this field is set to the Verbosity Level (switchValue) if a source name="System.ServiceModel" is detected in the element.

Tracing file name

Enter the name of the trace log *.svclog file to store the tracing information. This accepts the value of the initializeData attribute from the shared listener of type System.Diagnostics.XmlWriterTraceListener. On load, this value is disabled until either the Workflow tracing level or WCF tracing level is set to a value other than Off. Once a value other than Off is chosen for either of these tracing levels, the Tracing file name field becomes enabled and you can click Browse to bring up the standard Windows Open file dialog box to set the name of the trace log file.

Message Logging

Field

Description

Enable

Specify if System Diagnostics Message Logging is enabled. This field is checked if a source with name System.ServiceModel.MessageLogging is detected in the <system.diagnostics> section.

Log at Transport level

Accepts the value from logMessagesAtTransportLevel. Specifies whether or not messages are traced at the Transport level.

Log Entire Message

Accepts the value of logEntireMessage. Specifies whether entire messages are logged or not.

Log malformed messages

Accepts the value from logMalformedMessages. Specifies whether malformed messages are logged or not.

File name

Enter the name of the *.svclog log file to store the message logging information. This accepts the value of the initializeData attribute from the shared listener of type System.Diagnostics.XmlWriterTraceListener. On load, this value is disabled until the Enable checkbox is checked. At that point the File name field becomes enabled and you can click Browse to bring up the standard Windows Open file dialog box to set the name of the message log file.

The fields in the Configure Diagnostic Tracing and Message Logging dialog box correspond to the following elements and attributes in the configuration file.

<system.diagnostics>
  <sources>
    <source name="System.ServiceModel"
            switchValue="Information, ActivityTracing"
            propagateActivity="true">
      <listeners>
        <add name="xml" />
      </listeners>
    </source>
    <source name="System.Activities"
            switchValue="Information, ActivityTracing">
      <listeners>
        <add name="xml" />
      </listeners>
    </source>
    <source name="System.ServiceModel.MessageLogging">
      <listeners>
        <add name="messages"
             type="System.Diagnostics.XmlWriterTraceListener"
             initializeData="c:\logs\messages.svclog" />
      </listeners>
    </source>
  </sources>
  <sharedListeners>
    <add name="xml"
         type="System.Diagnostics.XmlWriterTraceListener"
         initializeData="c:\log\Traces.svclog" />
  </sharedListeners>
</system.diagnostics>
<system.serviceModel>
  <diagnostics>
    <messageLogging 
         logEntireMessage="true" 
         logMalformedMessages="false"
         logMessagesAtServiceLevel="true" 
         logMessagesAtTransportLevel="false"
         maxMessagesToLog="3000"
         maxSizeOfMessageToLog="2000"/>
  </diagnostics>
</system.serviceModel>

For more information on the message logging levels and their values, refer to Recommended Settings for Tracing and Message Logging.