Log(LogLevel, EventId, TState, Exception?, Func<TState, Exception?, string>)
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) Writes a log entry.
Parameters
logLevelLogLevel- Entry will be written on this level.
eventIdEventId- Id of the event.
stateTState- The entry to be written. Can be also an object.
exceptionException?- The exception related to this entry.
formatterFunc<TState, Exception?, string>- Function to create a
System.Stringmessage of thestateandexception.
