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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
exceptionExceptionThe 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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
exceptionExceptionThe error occurred during execution.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
exceptionExceptionThe 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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
exceptionExceptionThe exception.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
exceptionExceptionThe 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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
exceptionExceptionThe exception.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
exceptionExceptionThe 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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
exceptionExceptionThe error occurred during execution.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
levelTraceLevelThe trace level.
exceptionExceptionThe 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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
levelTraceLevelThe trace level.
exceptionExceptionThe error occurred during execution.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
levelTraceLevelThe TraceLevel of the trace.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
levelTraceLevelThe TraceLevel of the trace.
operatorNamestringThe name of the object performing the operation. It may be null.
operationNamestringThe name of the operation being performed. It may be null.
beginTraceAction<TraceRecord>The Action to invoke prior to performing the operation, allowing the given TraceRecord to be filled in. It may be null.
executeActionAn <see cref="T:System.Func`1" /> that returns the Task that will perform the operation.
endTraceAction<TraceRecord>The Action to invoke after successfully performing the operation, allowing the given TraceRecord to be filled in. It may be null.
errorTraceAction<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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
levelTraceLevelThe TraceLevel of the trace.
operatorNamestringThe name of the object performing the operation. It may be null.
operationNamestringThe name of the operation being performed. It may be null.
beginTraceAction<TraceRecord>The Action to invoke prior to performing the operation, allowing the given TraceRecord to be filled in. It may be null.
executeFunc<Task>An <see cref="T:System.Func`1" /> that returns the Task that will perform the operation.
endTraceAction<TraceRecord>The Action to invoke after successfully performing the operation, allowing the given TraceRecord to be filled in. It may be null.
errorTraceAction<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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
levelTraceLevelThe TraceLevel of the trace.
operatorNamestringThe name of the object performing the operation. It may be null.
operationNamestringThe name of the operation being performed. It may be null.
beginTraceAction<TraceRecord>The Action to invoke prior to performing the operation, allowing the given TraceRecord to be filled in. It may be null.
executeFunc<Task<TResult>>An <see cref="T:System.Func`1" /> that returns the Task that will perform the operation.
endTraceAction<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.
errorTraceAction<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
TResultThe 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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
exceptionExceptionThe 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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
exceptionExceptionThe error occurred during execution.
messageFormatstringThe format of the message.
messageArgumentsobject[]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
traceWriterITraceWriterThe ITraceWriter.
requestHttpRequestMessageThe HttpRequestMessage with which to associate the trace. It may be null.
categorystringThe logical category of the trace.
messageFormatstringThe format of the message.
messageArgumentsobject[]The message argument.