Skip to content

ILogger.Write(string, LogLevel) method

Defined in

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

Applies to

net11.0, net10.0, net471, net47, net472, net48, net481

Overloads

  1. void Write(string message, LogLevel logLevel)

  2. void Write(Exception exception, string message, LogLevel logLevel)

  3. void Write(string message, Type type, LogLevel logLevel)

  4. void Write(Exception exception, string message, Type type, LogLevel logLevel)

1. Overload

void Write(string message, LogLevel logLevel)

Summary: Writes a message to the target.

Parameters

NameTypeDescription
messagestring (opens in a new tab)The message to write.
logLevel[LogLevel](#Splat.LogLevel)The severity level of the log message.

2. Overload

void Write(Exception exception, string message, LogLevel logLevel)

Summary: Writes a message to the target.

Parameters

NameTypeDescription
exceptionException (opens in a new tab)The exception that occurred.
messagestring (opens in a new tab)The message to write.
logLevel[LogLevel](#The severity level of the log message.

3. Overload

void Write(string message, Type type, LogLevel logLevel)

Summary: Writes a message to the target.

Parameters

NameTypeDescription
messagestring (opens in a new tab)The message to write.
typeType (opens in a new tab)The type associated with the log message.
logLevel[LogLevel](#The severity level of the log message.

4. Overload

void Write(Exception exception, string message, Type type, LogLevel logLevel)

Summary: Writes a message to the target.

Parameters

NameTypeDescription
exceptionException (opens in a new tab)The exception that occurred.
messagestring (opens in a new tab)The message to write.
typeType (opens in a new tab)The type associated with the log message.
logLevel[LogLevel](#The severity level of the log message.