SyncTracer Class

Provides tracing for a synchronization session, with four levels of output: errors, warnings, informational, and verbose.

Inheritance Hierarchy

System.Object
  Microsoft.Synchronization.Data.SyncTracer

Namespace:  Microsoft.Synchronization.Data
Assembly:  Microsoft.Synchronization.Data (in Microsoft.Synchronization.Data.dll)

Syntax

'Declaration
Public NotInheritable Class SyncTracer
'Usage
public static class SyncTracer
public ref class SyncTracer abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type SyncTracer =  class end
public final class SyncTracer

The SyncTracer type exposes the following members.

Methods

  Name Description
Public methodStatic member Error(String) Generates an error trace when a message parameter is specified.
Public methodStatic member Error(Int32, String) Generates an error trace when the indentLevel and message parameters are specified.
Public methodStatic member Error(String, Object[]) Generates an error trace when the format and args parameters are specified.
Public methodStatic member Error(Int32, String, Object[]) Generates an error trace when the indentLevel, format, and args parameters are specified.
Public methodStatic member Info(String) Generates an informational trace when a message parameter is specified.
Public methodStatic member Info(Int32, String) Generates an informational trace when the indentLevel and message parameters are specified.
Public methodStatic member Info(String, Object[]) Generates an informational trace when the format and args parameters are specified.
Public methodStatic member Info(Int32, String, Object[]) Generates an informational trace when the indentLevel, format, and args parameters are specified.
Public methodStatic member IsErrorEnabled Returns whether an error trace will be included in the output.
Public methodStatic member IsInfoEnabled Returns whether an informational trace will be included in the output.
Public methodStatic member IsVerboseEnabled Returns whether a verbose trace will be included in the output.
Public methodStatic member IsWarningEnabled Returns whether a warning trace will be included in the output.
Public methodStatic member Verbose(String) Generates a verbose trace when a message parameter is specified.
Public methodStatic member Verbose(Int32, String) Generates a verbose trace when the indentLevel and message parameters are specified.
Public methodStatic member Verbose(String, Object[]) Generates a verbose trace when the format and args parameters are specified.
Public methodStatic member Verbose(Int32, String, Object[]) Generates a verbose trace when the indentLevel, format, and args parameters are specified.
Public methodStatic member Warning(String) Generates a warning trace when a message parameter is specified.
Public methodStatic member Warning(Int32, String) Generates a warning trace when the indentLevel and message parameters are specified.
Public methodStatic member Warning(String, Object[]) Generates a warning trace when the format and args parameters are specified.
Public methodStatic member Warning(Int32, String, Object[]) Generates a warning trace when the indentLevel, format, and args parameters are specified.

Top

Remarks

Tracing involves recording application operations, data, and metadata, and providing this information to a listener. A listener frequently writes trace information to a file, but could also handle the information in other ways. Sync Framework includes tracing for the client and server synchronization providers. In distributed applications, tracing can be very important because it enables you to troubleshoot issues that might otherwise be difficult to discover.

Tracing in Sync Framework is composed of the following components:

  • A tracing infrastructure that is based on the .NET Framework implementation of tracing, specifically the TraceListener class. The most important operations of the client and server providers are traced, and key metadata is provided to one or more listeners.

  • The SyncTracer object. This enables you to determine which level of tracing is enabled and to write messages to the trace output based on application events.

For more information, see Tracing the Synchronization Process.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Synchronization.Data Namespace