ITraceWriter.Trace Method (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.

Namespace:   System.Web.Http.Tracing
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

void Trace(
    HttpRequestMessage request,
    string category,
    TraceLevel level,
    Action<TraceRecord> traceAction
)
void Trace(
    HttpRequestMessage^ request,
    String^ category,
    TraceLevel level,
    Action<TraceRecord^>^ traceAction
)
abstract Trace : 
        request:HttpRequestMessage *
        category:string *
        level:TraceLevel *
        traceAction:Action<TraceRecord> -> unit
Sub Trace (
    request As HttpRequestMessage,
    category As String,
    level As TraceLevel,
    traceAction As Action(Of TraceRecord)
)

Parameters

  • category
    Type: System.String

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

  • traceAction
    Type: System.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.

See Also

ITraceWriter Interface
System.Web.Http.Tracing Namespace

Return to top