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) Version: (6.0.1304.0)

public class Tracer : IDisposable

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.