Compartir a través de


EventDefinition<TParam>.Log Método

Definición

Sobrecargas

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

Registra el evento o produce si el evento se ha configurado para que se trate como un error.

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

Registra el evento o produce si el evento se ha configurado para que se trate como un error.

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

Registra el evento o produce si el evento se ha configurado para que se trate como un error.

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

Registra el evento o produce si el evento se ha configurado para que se trate como un error.

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

Registra el evento o produce si el evento se ha configurado para que se trate como un error.

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)

Parámetros de tipo

TLoggerCategory

DbLoggerCategory.

Parámetros

logger
IDiagnosticsLogger<TLoggerCategory>

Registrador en el que se debe registrar el evento.

arg
TParam

Argumento de mensaje.

Se aplica a

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

Registra el evento o produce si el evento se ha configurado para que se trate como un error.

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)

Parámetros de tipo

TLoggerCategory

DbLoggerCategory.

Parámetros

logger
IDiagnosticsLogger<TLoggerCategory>

Registrador en el que se debe registrar el evento.

warningBehavior
WarningBehavior

Si se debe registrar el evento, se produce como una excepción o se omite.

arg
TParam

Argumento de mensaje.

Se aplica a

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

Precaución

Use the other overload

Registra el evento o produce si el evento se ha configurado para que se trate como un error.

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)

Parámetros de tipo

TLoggerCategory

DbLoggerCategory.

Parámetros

logger
IDiagnosticsLogger<TLoggerCategory>

Registrador en el que se debe registrar el evento.

arg
TParam

Argumento de mensaje.

exception
Exception

Excepción opcional asociada al evento.

Atributos

Se aplica a

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

Registra el evento o produce si el evento se ha configurado para que se trate como un error.

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)

Parámetros de tipo

TLoggerCategory

DbLoggerCategory.

Parámetros

logger
IDiagnosticsLogger<TLoggerCategory>

Registrador en el que se debe registrar el evento.

warningBehavior
WarningBehavior

Si se debe registrar el evento, se produce como una excepción o se omite.

arg
TParam

Argumento de mensaje.

exception
Exception

Excepción opcional asociada al evento.

Se aplica a