DSS Debug and Trace Messages

Glossary Item Box

DSS User Guide: DSS Application Configuration File

See Also Microsoft Robotics Developer Studio Send feedback on this topic

DSS Debug and Trace Messages

Bb608251.hs-caution(en-us,MSDN.10).gif The DSS Console Output Service is used to log information including debugging and trace information for services as well as the DSS runtime. Debugging information can contain sensitive information such as stack traces and other information that in some situations can reveal properties of the services and/or the runtime itself. In scenarios where such information should not be revealed it is strongly recommended that logging be disabled as described in this topic.

The Decentralized Software Services (DSS) runtime uses the System.Diagnostics.Trace class to log a variety of status messages while running. Trace messages are categories according to a set of trace switches which can be individually configured to show messages according to their level of severity ranging from verbose, informational, warning, to error. Messages written to the trace switches can be inspected in one of two ways:

  1. When a DSS node is running, the set of debug and trace messages can be seen by accessing the Console Output service which is a DSS System Services and accessible from a Web browser.
  2. Messages can be captured by various tools such as DebugView

The trace switches defined by DSS are as follows:

Microsoft.Ccr.Core

Contains messages generated by CCR

Microsoft.Dss.Core

Contains messages generated by DSS

Microsoft.Dss.Services

Contains messages generated by the DSS System Services such as the directory and contract directory.

Microsoft.Dss.Services.Transports

Contains messages generated by the network transport layer of the DSS runtime

Microsoft.Dss.Services.Forwarders

Contains messages generated by the message forwarders which sit between a DSS service and the transport

To configure the trace switches, open the Application Configuration file and look for the section named switches which is a part of the larger section named system.diagnostics:

  <switches>

      <add name="Microsoft.Ccr.Core" value="2" />

      <add name="Microsoft.Dss.Core" value="3" />

      <add name="Microsoft.Dss.Services.TestBase" value="3" />

      <add name="Microsoft.Dss.Services" value="3" />

      <add name="Microsoft.Dss.Services.Transports" value="2" />

      <add name="Microsoft.Dss.Services.Forwarders" value="2" />

  </switches>

Each switch can have one of the following values:

Value

Description

0

Trace switch is turned off.

1

Only messages with trace level error are shown.

2

Messages with trace level error and warning are shown

3

Messages with trace level error, warning, and informational are shown

4

All messages with trace level error, warning, informational, and verbose are shown

Service programmers can define their own trace switches using the System.Diagnostics.TraceSwitch .Net Framework class. By adding them to the application configuration file in a manner similar to that of the trace switches provided by DSS, they can be controlled in exactly the same manner as described above.

See Also 

DSS User Guide: DSS Application Configuration File

 

 

© 2012 Microsoft Corporation. All Rights Reserved.