Class ITraceWriterExtensions
Represents an extension methods for ITraceWriter.
public static class ITraceWriterExtensions
- Inheritance
-
ITraceWriterExtensions
- Inherited Members
Methods
Debug(ITraceWriter, HttpRequestMessage, string, Exception)
Provides a set of methods and properties that help debug your code with the specified writer, request, category and exception.
public static void Debug(this ITraceWriter traceWriter, HttpRequestMessage request, string category, Exception exception)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
exception
ExceptionThe error occurred during execution.
Debug(ITraceWriter, HttpRequestMessage, string, Exception, string, params object[])
Provides a set of methods and properties that help debug your code with the specified writer, request, category, exception, message format and argument.
public static void Debug(this ITraceWriter traceWriter, HttpRequestMessage request, string category, Exception exception, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
exception
ExceptionThe error occurred during execution.
messageFormat
stringThe format of the message.
messageArguments
object[]The message argument.
Debug(ITraceWriter, HttpRequestMessage, string, string, params object[])
Provides a set of methods and properties that help debug your code with the specified writer, request, category, exception, message format and argument.
public static void Debug(this ITraceWriter traceWriter, HttpRequestMessage request, string category, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
messageFormat
stringThe format of the message.
messageArguments
object[]The message argument.
Error(ITraceWriter, HttpRequestMessage, string, Exception)
Displays an error message in the list with the specified writer, request, category and exception.
public static void Error(this ITraceWriter traceWriter, HttpRequestMessage request, string category, Exception exception)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
exception
ExceptionThe error occurred during execution.
Error(ITraceWriter, HttpRequestMessage, string, Exception, string, params object[])
Displays an error message in the list with the specified writer, request, category, exception, message format and argument.
public static void Error(this ITraceWriter traceWriter, HttpRequestMessage request, string category, Exception exception, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
exception
ExceptionThe exception.
messageFormat
stringThe format of the message.
messageArguments
object[]The argument in the message.
Error(ITraceWriter, HttpRequestMessage, string, string, params object[])
Displays an error message in the list with the specified writer, request, category, message format and argument.
public static void Error(this ITraceWriter traceWriter, HttpRequestMessage request, string category, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
messageFormat
stringThe format of the message.
messageArguments
object[]The argument in the message.
Fatal(ITraceWriter, HttpRequestMessage, string, Exception)
Displays an error message in the ITraceWriterExtensions class with the specified writer, request, category and exception.
public static void Fatal(this ITraceWriter traceWriter, HttpRequestMessage request, string category, Exception exception)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
exception
ExceptionThe exception that appears during execution.
Fatal(ITraceWriter, HttpRequestMessage, string, Exception, string, params object[])
Displays an error message in the ITraceWriterExtensions class with the specified writer, request, category and exception, message format and argument.
public static void Fatal(this ITraceWriter traceWriter, HttpRequestMessage request, string category, Exception exception, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
exception
ExceptionThe exception.
messageFormat
stringThe format of the message.
messageArguments
object[]The message argument.
Fatal(ITraceWriter, HttpRequestMessage, string, string, params object[])
Displays an error message in the ITraceWriterExtensions class with the specified writer, request, category and message format and argument.
public static void Fatal(this ITraceWriter traceWriter, HttpRequestMessage request, string category, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
messageFormat
stringThe format of the message.
messageArguments
object[]The message argument.
Info(ITraceWriter, HttpRequestMessage, string, Exception)
Displays the details in the
public static void Info(this ITraceWriter traceWriter, HttpRequestMessage request, string category, Exception exception)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
exception
ExceptionThe error occurred during execution.
Info(ITraceWriter, HttpRequestMessage, string, Exception, string, params object[])
Displays the details in the
public static void Info(this ITraceWriter traceWriter, HttpRequestMessage request, string category, Exception exception, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
exception
ExceptionThe error occurred during execution.
messageFormat
stringThe format of the message.
messageArguments
object[]The message argument.
Info(ITraceWriter, HttpRequestMessage, string, string, params object[])
Displays the details in the
public static void Info(this ITraceWriter traceWriter, HttpRequestMessage request, string category, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
messageFormat
stringThe format of the message.
messageArguments
object[]The message argument.
Trace(ITraceWriter, HttpRequestMessage, string, TraceLevel, Exception)
Indicates the trace listeners in the Listeners collection.
public static void Trace(this ITraceWriter traceWriter, HttpRequestMessage request, string category, TraceLevel level, Exception exception)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
level
TraceLevelThe trace level.
exception
ExceptionThe error occurred during execution.
Trace(ITraceWriter, HttpRequestMessage, string, TraceLevel, Exception, string, params object[])
Indicates the trace listeners in the Listeners collection.
public static void Trace(this ITraceWriter traceWriter, HttpRequestMessage request, string category, TraceLevel level, Exception exception, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
level
TraceLevelThe trace level.
exception
ExceptionThe error occurred during execution.
messageFormat
stringThe format of the message.
messageArguments
object[]The message argument.
Trace(ITraceWriter, HttpRequestMessage, string, TraceLevel, string, params object[])
Indicates the trace listeners in the Listeners collection.
public static void Trace(this ITraceWriter traceWriter, HttpRequestMessage request, string category, TraceLevel level, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
level
TraceLevelThe TraceLevel of the trace.
messageFormat
stringThe format of the message.
messageArguments
object[]The message argument.
TraceBeginEnd(ITraceWriter, HttpRequestMessage, string, TraceLevel, string, string, Action<TraceRecord>, Action, Action<TraceRecord>, Action<TraceRecord>)
Traces both a begin and an end trace around a specified operation.
public static void TraceBeginEnd(this ITraceWriter traceWriter, HttpRequestMessage request, string category, TraceLevel level, string operatorName, string operationName, Action<TraceRecord> beginTrace, Action execute, Action<TraceRecord> endTrace, Action<TraceRecord> errorTrace)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
level
TraceLevelThe TraceLevel of the trace.
operatorName
stringThe name of the object performing the operation. It may be null.
operationName
stringThe name of the operation being performed. It may be null.
beginTrace
Action<TraceRecord>The Action to invoke prior to performing the operation, allowing the given TraceRecord to be filled in. It may be null.
execute
ActionAn <see cref="T:System.Func`1" /> that returns the Task that will perform the operation.
endTrace
Action<TraceRecord>The Action to invoke after successfully performing the operation, allowing the given TraceRecord to be filled in. It may be null.
errorTrace
Action<TraceRecord>The Action to invoke if an error was encountered performing the operation, allowing the given TraceRecord to be filled in. It may be null.
TraceBeginEndAsync(ITraceWriter, HttpRequestMessage, string, TraceLevel, string, string, Action<TraceRecord>, Func<Task>, Action<TraceRecord>, Action<TraceRecord>)
Traces both a begin and an end trace around a specified operation.
public static Task TraceBeginEndAsync(this ITraceWriter traceWriter, HttpRequestMessage request, string category, TraceLevel level, string operatorName, string operationName, Action<TraceRecord> beginTrace, Func<Task> execute, Action<TraceRecord> endTrace, Action<TraceRecord> errorTrace)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
level
TraceLevelThe TraceLevel of the trace.
operatorName
stringThe name of the object performing the operation. It may be null.
operationName
stringThe name of the operation being performed. It may be null.
beginTrace
Action<TraceRecord>The Action to invoke prior to performing the operation, allowing the given TraceRecord to be filled in. It may be null.
execute
Func<Task>An <see cref="T:System.Func`1" /> that returns the Task that will perform the operation.
endTrace
Action<TraceRecord>The Action to invoke after successfully performing the operation, allowing the given TraceRecord to be filled in. It may be null.
errorTrace
Action<TraceRecord>The Action to invoke if an error was encountered performing the operation, allowing the given TraceRecord to be filled in. It may be null.
Returns
TraceBeginEndAsync<TResult>(ITraceWriter, HttpRequestMessage, string, TraceLevel, string, string, Action<TraceRecord>, Func<Task<TResult>>, Action<TraceRecord, TResult>, Action<TraceRecord>)
Traces both a begin and an end trace around a specified operation.
public static Task<TResult> TraceBeginEndAsync<TResult>(this ITraceWriter traceWriter, HttpRequestMessage request, string category, TraceLevel level, string operatorName, string operationName, Action<TraceRecord> beginTrace, Func<Task<TResult>> execute, Action<TraceRecord, TResult> endTrace, Action<TraceRecord> errorTrace)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
level
TraceLevelThe TraceLevel of the trace.
operatorName
stringThe name of the object performing the operation. It may be null.
operationName
stringThe name of the operation being performed. It may be null.
beginTrace
Action<TraceRecord>The Action to invoke prior to performing the operation, allowing the given TraceRecord to be filled in. It may be null.
execute
Func<Task<TResult>>An <see cref="T:System.Func`1" /> that returns the Task that will perform the operation.
endTrace
Action<TraceRecord, TResult>The Action to invoke after successfully performing the operation, allowing the given TraceRecord to be filled in. The result of the completed task will also be passed to this action. This action may be null.
errorTrace
Action<TraceRecord>The Action to invoke if an error was encountered performing the operation, allowing the given TraceRecord to be filled in. It may be null.
Returns
Type Parameters
TResult
The type of result produced by the Task.
Warn(ITraceWriter, HttpRequestMessage, string, Exception)
Indicates the warning level of execution.
public static void Warn(this ITraceWriter traceWriter, HttpRequestMessage request, string category, Exception exception)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
exception
ExceptionThe error occurred during execution.
Warn(ITraceWriter, HttpRequestMessage, string, Exception, string, params object[])
Indicates the warning level of execution.
public static void Warn(this ITraceWriter traceWriter, HttpRequestMessage request, string category, Exception exception, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
exception
ExceptionThe error occurred during execution.
messageFormat
stringThe format of the message.
messageArguments
object[]The message argument.
Warn(ITraceWriter, HttpRequestMessage, string, string, params object[])
Indicates the warning level of execution.
public static void Warn(this ITraceWriter traceWriter, HttpRequestMessage request, string category, string messageFormat, params object[] messageArguments)
Parameters
traceWriter
ITraceWriterThe ITraceWriter.
request
HttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
category
stringThe logical category of the trace.
messageFormat
stringThe format of the message.
messageArguments
object[]The message argument.