Table of Contents

Class TraceRecord

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

Represents a trace record.

public class TraceRecord
Inheritance
TraceRecord
Inherited Members

Constructors

TraceRecord(HttpRequestMessage, string, TraceLevel)

Initializes a new instance of the TraceRecord class.

public TraceRecord(HttpRequestMessage request, string category, TraceLevel level)

Parameters

request HttpRequestMessage

The message request.

category string

The trace category.

level TraceLevel

The trace level.

Properties

Category

Gets or sets the tracing category.

public string Category { get; set; }

Property Value

string

The tracing category.

Exception

Gets or sets the exception.

public Exception Exception { get; set; }

Property Value

Exception

The exception.

Kind

Gets or sets the kind of trace.

public TraceKind Kind { get; set; }

Property Value

TraceKind

The kind of trace.

Level

Gets or sets the tracing level.

public TraceLevel Level { get; set; }

Property Value

TraceLevel

The tracing level.

Message

Gets or sets the message.

public string Message { get; set; }

Property Value

string

The message.

Operation

Gets or sets the logical operation name being performed.

public string Operation { get; set; }

Property Value

string

The logical operation name being performed.

Operator

Gets or sets the logical name of the object performing the operation.

public string Operator { get; set; }

Property Value

string

The logical name of the object performing the operation.

Properties

Gets the optional user-defined properties.

public Dictionary<object, object> Properties { get; }

Property Value

Dictionary<object, object>

The optional user-defined properties.

Request

Gets the HttpRequestMessage from the record.

public HttpRequestMessage Request { get; }

Property Value

HttpRequestMessage

The HttpRequestMessage from the record.

RequestId

Gets the correlation ID from the Request.

public Guid RequestId { get; }

Property Value

Guid

The correlation ID from the Request.

Status

Gets or sets the HttpStatusCode associated with the HttpResponseMessage.

public HttpStatusCode Status { get; set; }

Property Value

HttpStatusCode

The HttpStatusCode associated with the HttpResponseMessage.

Timestamp

Gets the DateTime of this trace (via UtcNow).

public DateTime Timestamp { get; }

Property Value

DateTime

The DateTime of this trace (via UtcNow).