Bagikan melalui


EventDefinitionBase.GetLogBehavior<TLoggerCategory> Metode

Definisi

Mendapatkan perilaku log untuk kejadian ini. Ini menentukan apakah harus dicatat, dilemparkan sebagai pengecualian atau diabaikan.

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

Jenis parameter

TLoggerCategory

DbLoggerCategory.

Parameter

logger
IDiagnosticsLogger<TLoggerCategory>

Pencatat tempat peristiwa akan dicatat.

Mengembalikan

Apakah peristiwa harus dicatat, dilemparkan sebagai pengecualian atau diabaikan.

Berlaku untuk