ILogger.LogAsync<TState> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Asynchronously logs a message with the specified log level, state, exception, and formatter.
public System.Threading.Tasks.Task LogAsync<TState>(Microsoft.Testing.Platform.Logging.LogLevel logLevel, TState state, Exception? exception, Func<TState,Exception?,string> formatter);
abstract member LogAsync : Microsoft.Testing.Platform.Logging.LogLevel * 'State * Exception * Func<'State, Exception, string> -> System.Threading.Tasks.Task
Public Function LogAsync(Of TState) (logLevel As LogLevel, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String)) As Task
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.
Returns
A task representing the asynchronous operation.