Skip to content

IStaticFullLogger.Write(string, LogLevel, 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 Write(string message, LogLevel logLevel, string? callerMemberName = null)
  • 2. void Write(Exception exception, string message, LogLevel logLevel, string? callerMemberName = null)
  • 3. void Write(string message, Type type, LogLevel logLevel, string? callerMemberName = null)
  • 4. void Write(Exception exception, string message, Type type, LogLevel logLevel, string? callerMemberName = null)

1. Overload

void Write(string message, LogLevel logLevel, string? callerMemberName = null)

Summary: Writes a message to the target.

Parameters

NameTypeDescription
messagestringThe message to write.
logLevel[LogLevel](#The severity level of the log message.
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 Write(Exception exception, string message, LogLevel logLevel, string? callerMemberName = null)

Summary: Writes a message to the target.

Parameters

NameTypeDescription
exceptionExceptionThe exception that occurred.
messagestringThe message to write.
logLevel[LogLevel](#The severity level of the log message.
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 Write(string message, Type type, LogLevel logLevel, string? callerMemberName = null)

Summary: Writes a message to the target.

Parameters

NameTypeDescription
messagestringThe message.
typeTypeThe type.
logLevel[LogLevel](#The log level.
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 Write(Exception exception, string message, Type type, LogLevel logLevel, string? callerMemberName = null)

Summary: Writes a message to the target.

Parameters

NameTypeDescription
exceptionExceptionThe exception that occurred.
messagestringThe message.
typeTypeThe type.
logLevel[LogLevel](#The log level.
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.