LogHelper.LogException Method

Definition

Overloads

LogException<T>(EventLevel, Exception, String, Object[])

Logs an exception using the event source logger and returns new typed exception.

LogException<T>(Exception, String, Object[])

Logs an exception using the event source logger and returns new typed exception.

LogException<T>(EventLevel, String, Object[])

Logs an exception using the event source logger and returns new typed exception.

LogException<T>(EventLevel, Exception, String)

Logs an exception using the event source logger and returns new typed exception.

LogException<T>(Exception, String)

Logs an exception using the event source logger and returns new typed exception.

LogException<T>(EventLevel, String)

Logs an exception using the event source logger and returns new typed exception.

LogException<T>(String)

Logs an exception using the event source logger and returns new typed exception.

LogException<T>(String, Object[])

Logs an exception using the event source logger and returns new typed exception.

LogException<T>(EventLevel, Exception, String, Object[])

Logs an exception using the event source logger and returns new typed exception.

public static T LogException<T> (System.Diagnostics.Tracing.EventLevel eventLevel, Exception innerException, string format, params object[] args) where T : Exception;

Type Parameters

T

Parameters

eventLevel
EventLevel

Identifies the level of an event to be logged.

innerException
Exception

the inner Exception to be added to the outer exception.

format
String

Format string of the log message.

args
Object[]

An object array that contains zero or more objects to format.

Returns

T

Applies to

LogException<T>(Exception, String, Object[])

Logs an exception using the event source logger and returns new typed exception.

public static T LogException<T> (Exception innerException, string format, params object[] args) where T : Exception;

Type Parameters

T

Parameters

innerException
Exception

the inner Exception to be added to the outer exception.

format
String

Format string of the log message.

args
Object[]

An object array that contains zero or more objects to format.

Returns

T

Remarks

EventLevel is set to Error.

Applies to

LogException<T>(EventLevel, String, Object[])

Logs an exception using the event source logger and returns new typed exception.

public static T LogException<T> (System.Diagnostics.Tracing.EventLevel eventLevel, string format, params object[] args) where T : Exception;

Type Parameters

T

Parameters

eventLevel
EventLevel

Identifies the level of an event to be logged.

format
String

Format string of the log message.

args
Object[]

An object array that contains zero or more objects to format.

Returns

T

Applies to

LogException<T>(EventLevel, Exception, String)

Logs an exception using the event source logger and returns new typed exception.

public static T LogException<T> (System.Diagnostics.Tracing.EventLevel eventLevel, Exception innerException, string message) where T : Exception;

Type Parameters

T

Parameters

eventLevel
EventLevel

Identifies the level of an event to be logged.

innerException
Exception

the inner Exception to be added to the outer exception.

message
String

message to log.

Returns

T

Applies to

LogException<T>(Exception, String)

Logs an exception using the event source logger and returns new typed exception.

public static T LogException<T> (Exception innerException, string message) where T : Exception;

Type Parameters

T

Parameters

innerException
Exception

the inner Exception to be added to the outer exception.

message
String

message to log.

Returns

T

Remarks

EventLevel is set to Error.

Applies to

LogException<T>(EventLevel, String)

Logs an exception using the event source logger and returns new typed exception.

public static T LogException<T> (System.Diagnostics.Tracing.EventLevel eventLevel, string message) where T : Exception;

Type Parameters

T

Parameters

eventLevel
EventLevel

Identifies the level of an event to be logged.

message
String

message to log.

Returns

T

Applies to

LogException<T>(String)

Logs an exception using the event source logger and returns new typed exception.

public static T LogException<T> (string message) where T : Exception;

Type Parameters

T

Parameters

message
String

message to log.

Returns

T

Remarks

EventLevel is set to Error.

Applies to

LogException<T>(String, Object[])

Logs an exception using the event source logger and returns new typed exception.

public static T LogException<T> (string format, params object[] args) where T : Exception;

Type Parameters

T

Parameters

format
String

Format string of the log message.

args
Object[]

An object array that contains zero or more objects to format.

Returns

T

Remarks

EventLevel is set to Error.

Applies to