LogEntry<TState> Costruttore

Definizione

Crea una nuova LogEntry<TState> usando il livello di log, la categoria, l'ID evento, lo stato, l'eccezione e i parametri del formattatore specificati.

public:
 LogEntry(Microsoft::Extensions::Logging::LogLevel logLevel, System::String ^ category, Microsoft::Extensions::Logging::EventId eventId, TState state, Exception ^ exception, Func<TState, Exception ^, System::String ^> ^ formatter);
public LogEntry (Microsoft.Extensions.Logging.LogLevel logLevel, string category, Microsoft.Extensions.Logging.EventId eventId, TState state, Exception exception, Func<TState,Exception,string> formatter);
public LogEntry (Microsoft.Extensions.Logging.LogLevel logLevel, string category, Microsoft.Extensions.Logging.EventId eventId, TState state, Exception? exception, Func<TState,Exception?,string> formatter);
new Microsoft.Extensions.Logging.Abstractions.LogEntry<'State> : Microsoft.Extensions.Logging.LogLevel * string * Microsoft.Extensions.Logging.EventId * 'State * Exception * Func<'State, Exception, string> -> Microsoft.Extensions.Logging.Abstractions.LogEntry<'State>
Public Sub New (logLevel As LogLevel, category As String, eventId As EventId, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String))

Parametri

logLevel
LogLevel

Il livello del log.

category
String

Nome della categoria per il log.

eventId
EventId

ID evento di registrazione.

state
TState

Stato per il quale viene scritto il log.

exception
Exception

Eccezione di log.

formatter
Func<TState,Exception,String>

Formattatore.

Si applica a