ServiceTraceWriter Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This System.Web.Http.Tracing.ITraceWriter implementation formats traces so that they include a request correlation identifier if available. In addition, it allows for traces to be filtered based on their respective "Category".
public class ServiceTraceWriter : System.Web.Http.Tracing.SystemDiagnosticsTraceWriter
type ServiceTraceWriter = class
inherit SystemDiagnosticsTraceWriter
Public Class ServiceTraceWriter
Inherits SystemDiagnosticsTraceWriter
- Inheritance
-
System.Web.Http.Tracing.SystemDiagnosticsTraceWriterServiceTraceWriter
Constructors
ServiceTraceWriter() |
Initializes a new instance of the ServiceTraceWriter class with default settings. |
Methods
Format(TraceRecord) | System.Web.Http.Tracing.SystemDiagnosticsTraceWriter.Format(System.Web.Http.Tracing.TraceRecord) |
IsApplicationTrace(String) |
Determines whether a category is a application category by checking that the trace does not start with any of the excluded category prefixes. |
SetExcludedCategoryPrefixes(IEnumerable<String>) |
Updates the set of category prefixes to exclude from user logging. Each trace has a "Category" indicating the origin (i.e. the "source") of the trace. An application may use the LogCategories as suggested categories, or simply leave out the category which will use the value provided by the CallerMemberNameAttribute. A log with a category that matches any of the excluded prefixes will not get logged. |
Trace(HttpRequestMessage, String, TraceLevel, Action<TraceRecord>) | System.Web.Http.Tracing.SystemDiagnosticsTraceWriter.Trace(System.Net.Http.HttpRequestMessage,System.String,System.Web.Http.Tracing.TraceLevel,System.Action{System.Web.Http.Tracing.TraceRecord}) |
Applies to
Azure SDK for .NET