FakeLogger.Log<TState> Metod

Definition

Skapar en ny loggpost.

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

Typparametrar

TState

Typen av objekt som ska skrivas.

Parametrar

logLevel
LogLevel

Posten skrivs på den här nivån.

eventId
EventId

Id för händelsen.

state
TState

Posten som ska skrivas. Kan också vara ett objekt.

exception
Exception

Undantaget som gäller den här posten.

formatter
Func<TState,Exception,String>

Funktion för att skapa ett strängmeddelande om tillståndet och undantaget.

Implementeringar

Gäller för