Method Log
Log<TState>(LogLevel, EventId, TState, Exception, Func<TState, Exception, string>)
Writes a log message.
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Parameters
logLevel
LogLevelThe log level of the message.
eventId
EventIdThe event id of the message.
state
TStateThe state object.
exception
ExceptionThe exception associated with the message.
formatter
Func<TState, Exception, string>A function that formats the state and exception into a log message.
Type Parameters
TState
The type of the state object.