TraceSourceLogger.Log<TState> Método

Definición

Escribe una entrada del registro.

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

Parámetros de tipo

TState

Parámetros

logLevel
LogLevel

La entrada se escribirá en este nivel.

eventId
EventId

Identificador del evento.

state
TState

La entrada que se va a escribir. También puede ser un objeto.

exception
Exception

La excepción relacionada con esta entrada.

formatter
Func<TState,Exception,String>

Función para crear un mensaje String de state y exception.

Implementaciones

Se aplica a