Tracer Class

Represents a performance tracing class to log method entry/exit and duration.

Namespace:  Microsoft.Practices.EnterpriseLibrary.Logging
Assembly:  Microsoft.Practices.EnterpriseLibrary.Logging (in Microsoft.Practices.EnterpriseLibrary.Logging.dll)

Syntax

'Declaration
Public Class Tracer _
    Implements IDisposable
public class Tracer : IDisposable
public ref class Tracer : IDisposable
public class Tracer implements IDisposable

Remarks

Lifetime of the Tracer object will determine the beginning and the end of the trace. The trace message will include, method being traced, start time, end time and duration.

Since Tracer uses the Logging Application Block to log the trace message, you can include application data as part of your trace message. Configured items from call context will be logged as part of the message.

Trace message will be logged to the log category with the same name as the tracer operation name. You must configure the operation categories, or the catch-all categories, with desired log sinks to log the trace messages.

Inheritance Hierarchy

System.Object
  Microsoft.Practices.EnterpriseLibrary.Logging.Tracer

See Also

Tracer Members

Microsoft.Practices.EnterpriseLibrary.Logging Namespace