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

Definition

Skriver en loggpost.

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

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 String meddelande om state och exception.

Implementeringar

Gäller för