Bagikan melalui


EventDefinition.Log Metode

Definisi

Overload

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, Exception)
Kedaluwarsa.

Mencatat peristiwa, atau melempar jika peristiwa telah dikonfigurasi untuk diperlakukan sebagai kesalahan.

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, WarningBehavior, Exception)

Mencatat peristiwa, atau melempar jika peristiwa telah dikonfigurasi untuk diperlakukan sebagai kesalahan.

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, Exception)

Perhatian

Use the other overload

Mencatat peristiwa, atau melempar jika peristiwa telah dikonfigurasi untuk diperlakukan sebagai kesalahan.

public virtual void Log<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger, Exception exception = default) where TLoggerCategory : Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<TLoggerCategory>, new();
[System.Obsolete("Use the other overload")]
public virtual void Log<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger, Exception exception = default) where TLoggerCategory : Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<TLoggerCategory>, new();
public virtual void Log<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger, Exception? exception = default) where TLoggerCategory : Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<TLoggerCategory>, new();
abstract member Log : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<'LoggerCategory (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))> * Exception -> unit (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))
override this.Log : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<'LoggerCategory (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))> * Exception -> unit (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))
[<System.Obsolete("Use the other overload")>]
abstract member Log : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<'LoggerCategory (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))> * Exception -> unit (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))
override this.Log : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<'LoggerCategory (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))> * Exception -> unit (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))
Public Overridable Sub Log(Of TLoggerCategory As {LoggerCategory(Of TLoggerCategory)New}) (logger As IDiagnosticsLogger(Of TLoggerCategory), Optional exception As Exception = Nothing)

Jenis parameter

TLoggerCategory

DbLoggerCategory.

Parameter

logger
IDiagnosticsLogger<TLoggerCategory>

Pencatat tempat peristiwa harus dicatat.

exception
Exception

Pengecualian opsional yang terkait dengan peristiwa.

Atribut

Berlaku untuk

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, WarningBehavior, Exception)

Mencatat peristiwa, atau melempar jika peristiwa telah dikonfigurasi untuk diperlakukan sebagai kesalahan.

public virtual void Log<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger, Microsoft.EntityFrameworkCore.WarningBehavior warningBehavior, Exception exception = default) where TLoggerCategory : Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<TLoggerCategory>, new();
abstract member Log : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<'LoggerCategory (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))> * Microsoft.EntityFrameworkCore.WarningBehavior * Exception -> unit (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))
override this.Log : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<'LoggerCategory (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))> * Microsoft.EntityFrameworkCore.WarningBehavior * Exception -> unit (requires 'LoggerCategory :> Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<'LoggerCategory> and 'LoggerCategory : (new : unit -> 'LoggerCategory))
Public Overridable Sub Log(Of TLoggerCategory As {LoggerCategory(Of TLoggerCategory)New}) (logger As IDiagnosticsLogger(Of TLoggerCategory), warningBehavior As WarningBehavior, Optional exception As Exception = Nothing)

Jenis parameter

TLoggerCategory

DbLoggerCategory.

Parameter

logger
IDiagnosticsLogger<TLoggerCategory>

Pencatat tempat peristiwa harus dicatat.

warningBehavior
WarningBehavior

Apakah peristiwa harus dicatat, dilemparkan sebagai pengecualian atau diabaikan.

exception
Exception

Pengecualian opsional yang terkait dengan peristiwa.

Berlaku untuk