SystemDiagnosticsTraceWriter Class

Implementation of ITraceWriter that traces to Trace

Inheritance Hierarchy

System.Object
  System.Web.Http.Tracing.SystemDiagnosticsTraceWriter

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

Syntax

'Declaration
Public Class SystemDiagnosticsTraceWriter _
    Implements ITraceWriter
'Usage
Dim instance As SystemDiagnosticsTraceWriter
public class SystemDiagnosticsTraceWriter : ITraceWriter
public ref class SystemDiagnosticsTraceWriter : ITraceWriter
type SystemDiagnosticsTraceWriter =  
    class 
        interface ITraceWriter 
    end
public class SystemDiagnosticsTraceWriter implements ITraceWriter

The SystemDiagnosticsTraceWriter type exposes the following members.

Constructors

  Name Description
Public method SystemDiagnosticsTraceWriter

Top

Properties

  Name Description
Public property IsVerbose Gets or sets a value indicating whether the formatted message should be the verbose format, meaning it displays all fields of the TraceRecord.
Public property MinimumLevel Gets or sets the minimum trace level.
Public property TraceSource Gets or sets the TraceSource to which the traces will be sent.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method Format Formats the contents of the given TraceRecord into a single string containing comma-separated name-value pairs for each TraceRecord property.
Public method FormatDateTime Formats a DateTime for the trace.
Public method FormatRequestEnvelope Formats the given TraceRecord into a string describing either the initial receipt of the incoming request or the final send of the response, depending on TraceKind.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)
Public method Trace Writes a trace to Trace if the level is greater than or equal MinimumLevel.
Public method TranslateHttpResponseException Examines the given TraceRecord to determine whether it contains an HttpResponseException and if so, modifies the TraceRecord to capture more detailed information.

Top

Extension Methods

  Name Description
Public Extension Method Debug(HttpRequestMessage, String, Exception) Overloaded. Provides a set of methods and properties that help debug your code with the specified writer, request, category and exception. (Defined by ITraceWriterExtensions.)
Public Extension Method Debug(HttpRequestMessage, String, String, Object[]) Overloaded. Provides a set of methods and properties that help debug your code with the specified writer, request, category, exception, message format and argument. (Defined by ITraceWriterExtensions.)
Public Extension Method Debug(HttpRequestMessage, String, Exception, String, Object[]) Overloaded. Provides a set of methods and properties that help debug your code with the specified writer, request, category, exception, message format and argument. (Defined by ITraceWriterExtensions.)
Public Extension Method Error(HttpRequestMessage, String, Exception) Overloaded. Displays an error message in the list with the specified writer, request, category and exception. (Defined by ITraceWriterExtensions.)
Public Extension Method Error(HttpRequestMessage, String, String, Object[]) Overloaded. Displays an error message in the list with the specified writer, request, category, message format and argument. (Defined by ITraceWriterExtensions.)
Public Extension Method Error(HttpRequestMessage, String, Exception, String, Object[]) Overloaded. Displays an error message in the list with the specified writer, request, category, exception, message format and argument. (Defined by ITraceWriterExtensions.)
Public Extension Method Fatal(HttpRequestMessage, String, Exception) Overloaded. Displays an error message in the ITraceWriterExtensions class with the specified writer, request, category and exception. (Defined by ITraceWriterExtensions.)
Public Extension Method Fatal(HttpRequestMessage, String, String, Object[]) Overloaded. Displays an error message in the ITraceWriterExtensions class with the specified writer, request, category and message format and argument. (Defined by ITraceWriterExtensions.)
Public Extension Method Fatal(HttpRequestMessage, String, Exception, String, Object[]) Overloaded. Displays an error message in the ITraceWriterExtensions class with the specified writer, request, category and exception, message format and argument. (Defined by ITraceWriterExtensions.)
Public Extension Method Info(HttpRequestMessage, String, Exception) Overloaded. Displays the details in the [System.Web.Http.Tracing.ITraceWriterExtensions]. (Defined by ITraceWriterExtensions.)
Public Extension Method Info(HttpRequestMessage, String, String, Object[]) Overloaded. Displays the details in the [System.Web.Http.Tracing.ITraceWriterExtensions]. (Defined by ITraceWriterExtensions.)
Public Extension Method Info(HttpRequestMessage, String, Exception, String, Object[]) Overloaded. Displays the details in the [System.Web.Http.Tracing.ITraceWriterExtensions]. (Defined by ITraceWriterExtensions.)
Public Extension Method Trace(HttpRequestMessage, String, TraceLevel, Exception) Overloaded. Indicates the trace listeners in the Listeners collection. (Defined by ITraceWriterExtensions.)
Public Extension Method Trace(HttpRequestMessage, String, TraceLevel, String, Object[]) Overloaded. Indicates the trace listeners in the Listeners collection. (Defined by ITraceWriterExtensions.)
Public Extension Method Trace(HttpRequestMessage, String, TraceLevel, Exception, String, Object[]) Overloaded. Indicates the trace listeners in the Listeners collection. (Defined by ITraceWriterExtensions.)
Public Extension Method TraceBeginEnd Traces both a begin and an end trace around a specified operation. (Defined by ITraceWriterExtensions.)
Public Extension Method TraceBeginEndAsync(HttpRequestMessage, String, TraceLevel, String, String, Action(Of TraceRecord), Func(Of Task), Action(Of TraceRecord), Action(Of TraceRecord)) Overloaded. Traces both a begin and an end trace around a specified operation. (Defined by ITraceWriterExtensions.)
Public Extension Method TraceBeginEndAsync(Of TResult)(HttpRequestMessage, String, TraceLevel, String, String, Action(Of TraceRecord), Func(Of Task(Of TResult)), Action(Of TraceRecord, TResult), Action(Of TraceRecord))

Overloaded. Traces both a begin and an end trace around a specified operation. (Defined by ITraceWriterExtensions.)
Public Extension Method Warn(HttpRequestMessage, String, Exception) Overloaded. Indicates the warning level of execution. (Defined by ITraceWriterExtensions.)
Public Extension Method Warn(HttpRequestMessage, String, String, Object[]) Overloaded. Indicates the warning level of execution. (Defined by ITraceWriterExtensions.)
Public Extension Method Warn(HttpRequestMessage, String, Exception, String, Object[]) Overloaded. Indicates the warning level of execution. (Defined by ITraceWriterExtensions.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Http.Tracing Namespace