Condividi tramite


EventDefinitionBase.GetLogBehavior<TLoggerCategory> Metodo

Definizione

Ottiene il comportamento del log per questo evento. Ciò determina se deve essere registrato, generato come eccezione o ignorato.

public virtual Microsoft.EntityFrameworkCore.WarningBehavior GetLogBehavior<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger) where TLoggerCategory : Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<TLoggerCategory>, new();
abstract member GetLogBehavior : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<'LoggerCategory (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))> -> Microsoft.EntityFrameworkCore.WarningBehavior (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))
override this.GetLogBehavior : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<'LoggerCategory (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))> -> Microsoft.EntityFrameworkCore.WarningBehavior (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))
Public Overridable Function GetLogBehavior(Of TLoggerCategory As {LoggerCategory(Of TLoggerCategory)New}) (logger As IDiagnosticsLogger(Of TLoggerCategory)) As WarningBehavior

Parametri di tipo

TLoggerCategory

Oggetto DbLoggerCategory.

Parametri

logger
IDiagnosticsLogger<TLoggerCategory>

Logger in cui verrà registrato l'evento.

Restituisce

Indica se l'evento deve essere registrato, generato come eccezione o ignorato.

Si applica a