Udostępnij za pośrednictwem


EventDefinition<TParam1,TParam2>.Log Metoda

Definicja

Przeciążenia

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, TParam1, TParam2)

Rejestruje zdarzenie lub zgłasza, czy zdarzenie zostało skonfigurowane do traktowania jako błędu.

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, WarningBehavior, TParam1, TParam2)

Rejestruje zdarzenie lub zgłasza, czy zdarzenie zostało skonfigurowane do traktowania jako błędu.

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

Rejestruje zdarzenie lub zgłasza, czy zdarzenie zostało skonfigurowane do traktowania jako błędu.

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

Rejestruje zdarzenie lub zgłasza, czy zdarzenie zostało skonfigurowane do traktowania jako błędu.

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, TParam1, TParam2)

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

Rejestruje zdarzenie lub zgłasza, czy zdarzenie zostało skonfigurowane do traktowania jako błędu.

public virtual void Log<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger, TParam1 arg1, TParam2 arg2) 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))> * 'TParam1 * 'TParam2 -> 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))> * 'TParam1 * 'TParam2 -> 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), arg1 As TParam1, arg2 As TParam2)

Parametry typu

TLoggerCategory

Element DbLoggerCategory.

Parametry

logger
IDiagnosticsLogger<TLoggerCategory>

Rejestrator, do którego ma zostać zarejestrowane zdarzenie.

arg1
TParam1

Pierwszy argument komunikatu.

arg2
TParam2

Drugi argument komunikatu.

Dotyczy

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, WarningBehavior, TParam1, TParam2)

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

Rejestruje zdarzenie lub zgłasza, czy zdarzenie zostało skonfigurowane do traktowania jako błędu.

public virtual void Log<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger, Microsoft.EntityFrameworkCore.WarningBehavior warningBehavior, TParam1 arg1, TParam2 arg2) 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 * 'TParam1 * 'TParam2 -> 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 * 'TParam1 * 'TParam2 -> 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, arg1 As TParam1, arg2 As TParam2)

Parametry typu

TLoggerCategory

Element DbLoggerCategory.

Parametry

logger
IDiagnosticsLogger<TLoggerCategory>

Rejestrator, do którego ma zostać zarejestrowane zdarzenie.

warningBehavior
WarningBehavior

Niezależnie od tego, czy zdarzenie powinno być rejestrowane, zgłaszane jako wyjątek, czy ignorowane.

arg1
TParam1

Pierwszy argument komunikatu.

arg2
TParam2

Drugi argument komunikatu.

Dotyczy

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

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

Przestroga

Use the other overload

Rejestruje zdarzenie lub zgłasza, czy zdarzenie zostało skonfigurowane do traktowania jako błędu.

public virtual void Log<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger, TParam1 arg1, TParam2 arg2, 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, TParam1 arg1, TParam2 arg2, 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))> * 'TParam1 * 'TParam2 * 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))> * 'TParam1 * 'TParam2 * 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))> * 'TParam1 * 'TParam2 * 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))> * 'TParam1 * 'TParam2 * 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), arg1 As TParam1, arg2 As TParam2, Optional exception As Exception = Nothing)

Parametry typu

TLoggerCategory

Element DbLoggerCategory.

Parametry

logger
IDiagnosticsLogger<TLoggerCategory>

Rejestrator, do którego ma zostać zarejestrowane zdarzenie.

arg1
TParam1

Pierwszy argument komunikatu.

arg2
TParam2

Drugi argument komunikatu.

exception
Exception

Opcjonalny wyjątek skojarzony ze zdarzeniem.

Atrybuty

Dotyczy

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

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

Rejestruje zdarzenie lub zgłasza, czy zdarzenie zostało skonfigurowane do traktowania jako błędu.

public virtual void Log<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger, Microsoft.EntityFrameworkCore.WarningBehavior warningBehavior, TParam1 arg1, TParam2 arg2, 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 * 'TParam1 * 'TParam2 * 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 * 'TParam1 * 'TParam2 * 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, arg1 As TParam1, arg2 As TParam2, Optional exception As Exception = Nothing)

Parametry typu

TLoggerCategory

Element DbLoggerCategory.

Parametry

logger
IDiagnosticsLogger<TLoggerCategory>

Rejestrator, do którego ma zostać zarejestrowane zdarzenie.

warningBehavior
WarningBehavior

Niezależnie od tego, czy zdarzenie powinno być rejestrowane, zgłaszane jako wyjątek, czy ignorowane.

arg1
TParam1

Pierwszy argument komunikatu.

arg2
TParam2

Drugi argument komunikatu.

exception
Exception

Opcjonalny wyjątek skojarzony ze zdarzeniem.

Dotyczy