Bagikan melalui


Configure Message Logging

This topic describes diagnostic message logging and its related configuration options in Windows Server AppFabric.

Diagnostic Message Logging Overview

When you configure System.Diagnostics settings, you are enabling and setting the <System.Diagnostics> section in the Web.config file for the scope you have selected. You can configure these options at the server, site, or application scope. Windows Communication Foundation (WCF) message logging is not available at the service scope.

The following table lists diagnostic message logging options that are exposed by the Configure Diagnostic Tracing and Message Logging dialog box. Values for XMLWriterTraceListener attributes that are not exposed by this dialog box are set to their default values.

Message Logging Option Meaning

Enable

When selected, this enables System.ServiceModel.MessageLogging. The default is off (cleared).

Log at transport level

Sets the logMessagesAtTransportLevel attribute to True (selected) or False (cleared).

Log malformed messages

Sets the logMalformedMessages attribute to True (selected) or False (cleared).

Log entire message

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

Filename

Fully qualified path and name for the message log file. This sets the value of the initializeData attribute of the System.Diagnostics.XMLWriterTraceListener.

For more information about the meaning and implications of the settings described in this table, see Configuring Message Logging (https://go.microsoft.com/fwlink/?LinkId=168572).

You can enable message logging to a file, and the message log is configured independently of the WCF and WF tracing log. The log file is created by System.Diagnostics.XMLWriterTraceListener and is suitable for viewing with the Service Trace Viewer Tool (https://go.microsoft.com/fwlink/?LinkID=127094).

Configuring Message Logging

This procedure shows you how to use the Configure Diagnostic Tracing and Message Logging dialog box to enable or disable message logging and to configure message logging options.

To configure WCF message logging

  1. In IIS Manager, in the Connections pane, select the scope at which you want to configure tracing: server, site, or application.

  2. Right-click the scope and then click Manage WCF and WF Services (alternatively, find the Manage WCF and WF Services section in the Actions pane). The Configure WF and WCF dialog box appears. Click Monitoring.

  3. On the Monitoring tab, under Diagnostic Tracing and Message Logging, click Configure. The Configure Diagnostic Tracing and Message Logging dialog box appears.

  4. Select message logging settings and specify the log file to use.

  5. Click OK to close the dialog box and save your changes.

See Also

Reference

Configure WCF and WF for Server, Site, or Application: Monitoring Tab

Concepts

Configuring Monitoring Using Windows Server AppFabric Cmdlets
Configuring Monitoring
Configure Tracing
Monitoring Applications