NullLogger<T>.Log<TState> Methode

Definition

Schreibt einen Protokolleintrag.

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);
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))

Typparameter

TState

Der Typ des zu schreibenden Objekts.

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

Hinweise

Diese Methode ignoriert die Parameter und führt nichts aus.

Gilt für: