Udostępnij za pośrednictwem


EventDefinition.Log Metoda

Definicja

Przeciążenia

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, Exception)
Przestarzałe.

Rejestruje zdarzenie lub zgłasza błąd, jeśli zdarzenie zostało skonfigurowane do traktowania jako błędu.

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

Rejestruje zdarzenie lub zgłasza błąd, jeśli zdarzenie zostało skonfigurowane do traktowania jako błędu.

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

Źródło:
EventDefinition.cs
Źródło:
EventDefinition.cs
Źródło:
EventDefinition.cs
Źródło:
EventDefinition.cs
Źródło:
EventDefinition.cs
Źródło:
EventDefinition.cs
Źródło:
EventDefinition.cs

Przestroga

Use the other overload

Rejestruje zdarzenie lub zgłasza błąd, jeśli zdarzenie zostało skonfigurowane do traktowania jako błędu.

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)

Parametry typu

TLoggerCategory

Element DbLoggerCategory.

Parametry

logger
IDiagnosticsLogger<TLoggerCategory>

Rejestrator, do którego powinno być rejestrowane zdarzenie.

exception
Exception

Opcjonalny wyjątek skojarzony ze zdarzeniem.

Atrybuty

Dotyczy

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

Źródło:
EventDefinition.cs
Źródło:
EventDefinition.cs
Źródło:
EventDefinition.cs
Źródło:
EventDefinition.cs

Rejestruje zdarzenie lub zgłasza błąd, jeśli zdarzenie zostało skonfigurowane do traktowania jako błędu.

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)

Parametry typu

TLoggerCategory

Element DbLoggerCategory.

Parametry

logger
IDiagnosticsLogger<TLoggerCategory>

Rejestrator, do którego powinno być rejestrowane zdarzenie.

warningBehavior
WarningBehavior

Czy zdarzenie powinno być rejestrowane, zgłaszane jako wyjątek, czy ignorowane.

exception
Exception

Opcjonalny wyjątek skojarzony ze zdarzeniem.

Dotyczy