Udostępnij za pośrednictwem


EventDefinition<TParam>.Log Metoda

Definicja

Przeciążenia

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

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

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

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

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, TParam, 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, TParam, Exception)

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

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

Źródło:
EventDefinition%60.cs
Źródło:
EventDefinition%60.cs
Źródło:
EventDefinition%60.cs
Źródło:
EventDefinition%60.cs
Źródło:
EventDefinition%60.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, TParam arg) 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))> * 'Param -> 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))> * 'Param -> 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), arg As TParam)

Parametry typu

TLoggerCategory

Element DbLoggerCategory.

Parametry

logger
IDiagnosticsLogger<TLoggerCategory>

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

arg
TParam

Argument komunikatu.

Dotyczy

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

Źródło:
EventDefinition%60.cs
Źródło:
EventDefinition%60.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, TParam arg) 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 * 'Param -> 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 * 'Param -> 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, arg As TParam)

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.

arg
TParam

Argument komunikatu.

Dotyczy

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

Źródło:
EventDefinition%60.cs
Źródło:
EventDefinition%60.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, TParam arg, 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, TParam arg, 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))> * 'Param * 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))> * 'Param * 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))> * 'Param * 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))> * 'Param * 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), arg As TParam, Optional exception As Exception = Nothing)

Parametry typu

TLoggerCategory

Element DbLoggerCategory.

Parametry

logger
IDiagnosticsLogger<TLoggerCategory>

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

arg
TParam

Argument komunikatu.

exception
Exception

Opcjonalny wyjątek skojarzony ze zdarzeniem.

Atrybuty

Dotyczy

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

Źródło:
EventDefinition%60.cs
Źródło:
EventDefinition%60.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, TParam arg, 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 * 'Param * 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 * 'Param * 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, arg As TParam, 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.

arg
TParam

Argument komunikatu.

exception
Exception

Opcjonalny wyjątek skojarzony ze zdarzeniem.

Dotyczy