EventLogLogger.Log<TState> Metoda

Definicja

Zapisuje wpis dziennika.

public:
generic <typename TState>
 virtual void Log(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, TState state, Exception ^ exception, Func<TState, Exception ^, System::String ^> ^ formatter);
public void Log<TState> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, Exception exception, Func<TState,Exception,string> formatter);
abstract member Log : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * 'State * Exception * Func<'State, Exception, string> -> unit
override this.Log : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * 'State * Exception * Func<'State, Exception, string> -> unit
Public Sub Log(Of TState) (logLevel As LogLevel, eventId As EventId, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String))

Parametry typu

TState

Parametry

logLevel
LogLevel

Wpis zostanie zapisany na tym poziomie.

eventId
EventId

Identyfikator zdarzenia.

state
TState

Wpis, który ma zostać zapisany. Może być również obiektem.

exception
Exception

Wyjątek związany z tym wpisem.

formatter
Func<TState,Exception,String>

Funkcja do tworzenia String komunikatu z state i exception .

Implementuje

Dotyczy