ILogger.Log<TState> Method

Definition

Logs a message with the specified log level, state, exception, and formatter.

public void Log<TState>(Microsoft.Testing.Platform.Logging.LogLevel logLevel, TState state, Exception? exception, Func<TState,Exception?,string> formatter);
abstract member Log : Microsoft.Testing.Platform.Logging.LogLevel * 'State * Exception * Func<'State, Exception, string> -> unit
Public Sub Log(Of TState) (logLevel As LogLevel, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String))

Type Parameters

TState

The type of the state object.

Parameters

logLevel
LogLevel

The log level of the message.

state
TState

The state object.

exception
Exception

The exception associated with the message.

formatter
Func<TState,Exception,String>

The formatter function to format the message.

Applies to