DiagnosticLogger.

Log<TState>(LogLevel, EventId, TState, Exception, Func<TState, Exception, string>) Method

Summary

Writes a log entry.

Syntax

public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)

Type Parameters

Name Description
TState The type of the t state.

Parameters

Name Type Description
logLevel LogLevel Entry will be written on this level.
eventId EventId Id of the event.
state TState The entry to be written. Can be also an object.
exception Exception The exception related to this entry.
formatter Func<TState, Exception, string> Function to create a string message of the state and exception.

Return Value

Type Description
void