Partager via


FallbackEventDefinition.Log Méthode

Définition

Surcharges

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, Action<ILogger>)
Obsolète.

Consigne l’événement ou lève si l’événement a été configuré pour être traité comme une erreur.

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, WarningBehavior, Action<ILogger>)

Consigne l’événement ou lève si l’événement a été configuré pour être traité comme une erreur.

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, Action<ILogger>)

Source:
FallbackEventDefinition.cs
Source:
FallbackEventDefinition.cs
Source:
FallbackEventDefinition.cs
Source:
FallbackEventDefinition.cs
Source:
FallbackEventDefinition.cs
Source:
FallbackEventDefinition.cs
Source:
FallbackEventDefinition.cs

Attention

Use the other overload

Consigne l’événement ou lève si l’événement a été configuré pour être traité comme une erreur.

public virtual void Log<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger, Action<Microsoft.Extensions.Logging.ILogger> logAction) 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, Action<Microsoft.Extensions.Logging.ILogger> logAction) 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))> * Action<Microsoft.Extensions.Logging.ILogger> -> 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))> * Action<Microsoft.Extensions.Logging.ILogger> -> 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))> * Action<Microsoft.Extensions.Logging.ILogger> -> 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))> * Action<Microsoft.Extensions.Logging.ILogger> -> 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), logAction As Action(Of ILogger))

Paramètres de type

TLoggerCategory

L’DbLoggerCategoryopérateur

Paramètres

logger
IDiagnosticsLogger<TLoggerCategory>

Journalisation dans lequel l’événement doit être journalisé.

logAction
Action<ILogger>

Délégué qui journalisera le message dans un ILogger.

Attributs

S’applique à

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, WarningBehavior, Action<ILogger>)

Source:
FallbackEventDefinition.cs
Source:
FallbackEventDefinition.cs
Source:
FallbackEventDefinition.cs
Source:
FallbackEventDefinition.cs

Consigne l’événement ou lève si l’événement a été configuré pour être traité comme une erreur.

public virtual void Log<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger, Microsoft.EntityFrameworkCore.WarningBehavior warningBehavior, Action<Microsoft.Extensions.Logging.ILogger> logAction) 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 * Action<Microsoft.Extensions.Logging.ILogger> -> 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 * Action<Microsoft.Extensions.Logging.ILogger> -> 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, logAction As Action(Of ILogger))

Paramètres de type

TLoggerCategory

L’DbLoggerCategoryopérateur

Paramètres

logger
IDiagnosticsLogger<TLoggerCategory>

Journalisation dans lequel l’événement doit être journalisé.

warningBehavior
WarningBehavior

Indique si l’événement doit être journalisé, levée en tant qu’exception ou ignoré.

logAction
Action<ILogger>

Délégué qui journalisera le message dans un ILogger.

S’applique à