Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ITraceWriter.Trace Method (HttpRequestMessage, String, TraceLevel, Action(Of 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)

Sub Trace (
	request As HttpRequestMessage,
	category As String,
	level As TraceLevel,
	traceAction As Action(Of TraceRecord)


Type: System.Net.Http.HttpRequestMessage

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

Type: System.String

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

Type: System.Web.Http.Tracing.TraceLevel

The TraceLevel at which to write this trace.

Type: System.Action(Of 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.

Return to top
© 2015 Microsoft