Skip to content

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

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

View source
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.String message of the state and exception.