Table of Contents

Interface ITraceWriter

Namespace
System.Web.Http.Tracing
Assembly
System.Web.Http.dll

Represents the trace writer.

public interface ITraceWriter
Extension Methods

Methods

Trace(HttpRequestMessage, string, TraceLevel, Action<TraceRecord>)

Invokes the specified traceAction to allow setting values in a new TraceRecord if and only if tracing is permitted at the given category and level.

void Trace(HttpRequestMessage request, string category, TraceLevel level, Action<TraceRecord> traceAction)

Parameters

request HttpRequestMessage

The current HttpRequestMessage. It may be null but doing so will prevent subsequent trace analysis from correlating the trace to a particular request.

category string

The logical category for the trace. Users can define their own.

level TraceLevel

The TraceLevel at which to write this trace.

traceAction Action<TraceRecord>

The action to invoke if tracing is enabled. The caller is expected to fill in the fields of the given TraceRecord in this action.