Logger<T>.ILogger.Log<TState> Methode

Definition

Schreibt einen Protokolleintrag.

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

Typparameter

TState

Parameter

logLevel
LogLevel

Der Eintrag wird auf dieser Ebene geschrieben.

eventId
EventId

ID des Ereignisses.

state
TState

Der zu schreibende Eintrag. Kann auch ein Objekt sein.

exception
Exception

Die Ausnahme, die sich auf diesen Eintrag bezieht.

formatter
Func<TState,Exception,String>

Funktion zum Erstellen einer String-Nachricht des state-Parameters und exception-Parameters.

Implementiert

Gilt für