Skip to content

IStaticFullLogger.Error(Exception, string, string?) method

Defined in

Type: IStaticFullLogger Namespace: Splat Assembly: Splat.Logging.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

Overloads

  • 1. void Error(Exception exception, string message, string? callerMemberName = null)
  • 2. void Error(string message, string? callerMemberName = null)
  • 3. void Error<T>(string message, string? callerMemberName = null)
  • 4. void Error<TArgument>(IFormatProvider formatProvider, string message, TArgument argument, string? callerMemberName = null)
  • 5. void Error<TArgument1, TArgument2>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, string? callerMemberName = null)
  • 6. void Error<TArgument1, TArgument2, TArgument3>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, string? callerMemberName = null)

1. Overload

void Error(Exception exception, string message, string? callerMemberName = null)

Summary: Emits a error log message with exception. This will emit details about a exception. This type of logging is not able to be localized.

Parameters

NameTypeDescription
exceptionExceptionThe exception which to emit in the log.
messagestringA message to emit.
callerMemberName = nullstring?Allows you to pass the method or property name of the caller to the method, used to allow the capture in the static logger of some additional context for support and debugging.

2. Overload

void Error(string message, string? callerMemberName = null)

Summary: Emits a message to the error log.

Parameters

NameTypeDescription
messagestringA non-localizable message to send to the log.
callerMemberName = nullstring?Allows you to pass the method or property name of the caller to the method, used to allow the capture in the static logger of some additional context for support and debugging.

3. Overload

void Error<T>(string message, string? callerMemberName = null)

Summary: Emits a message to the error log.

Type parameters

NameDescription
TThe calling type.

Parameters

NameTypeDescription
messagestringA non-localizable message to send to the log.
callerMemberName = nullstring?Allows you to pass the method or property name of the caller to the method, used to allow the capture in the static logger of some additional context for support and debugging.

4. Overload

void Error<TArgument>(IFormatProvider formatProvider, string message, TArgument argument, string? callerMemberName = null)

Summary: Emits a message using formatting to the error log.

Type parameters

NameDescription
TArgumentThe type of the argument which is used in the formatting.

Parameters

NameTypeDescription
formatProviderIFormatProviderThe format provider to use.
messagestringA message to emit to the log which includes the standard formatting tags.
argumentTArgumentThe argument for formatting purposes.
callerMemberName = nullstring?Allows you to pass the method or property name of the caller to the method, used to allow the capture in the static logger of some additional context for support and debugging.

5. Overload

void Error<TArgument1, TArgument2>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, string? callerMemberName = null)

Summary: Emits a message using formatting to the error log.

Type parameters

NameDescription
TArgument1The type of the first argument which is used in the formatting.
TArgument2The type of the second argument which is used in the formatting.

Parameters

NameTypeDescription
formatProviderIFormatProviderThe format provider to use.
messagestringA message to emit to the log which includes the standard formatting tags.
argument1TArgument1The first argument for formatting purposes.
argument2TArgument2The second argument for formatting purposes.
callerMemberName = nullstring?Allows you to pass the method or property name of the caller to the method, used to allow the capture in the static logger of some additional context for support and debugging.

6. Overload

void Error<TArgument1, TArgument2, TArgument3>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, string? callerMemberName = null)

Summary: Emits a message using formatting to the error log.

Type parameters

NameDescription
TArgument1The type of the first argument which is used in the formatting.
TArgument2The type of the second argument which is used in the formatting.
TArgument3The type of the third argument which is used in the formatting.

Parameters

NameTypeDescription
formatProviderIFormatProviderThe format provider to use.
messagestringA message to emit to the log which includes the standard formatting tags.
argument1TArgument1The first argument for formatting purposes.
argument2TArgument2The second argument for formatting purposes.
argument3TArgument3The third argument for formatting purposes.
callerMemberName = nullstring?Allows you to pass the method or property name of the caller to the method, used to allow the capture in the static logger of some additional context for support and debugging.