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
logLevelLogLevelThe log level of the message.
eventIdEventIdThe event id of the message.
stateTStateThe state object.
exceptionExceptionThe exception associated with the message.
formatterFunc<TState, Exception, string>A function that formats the state and exception into a log message.
Type Parameters
TStateThe type of the state object.