共用方式為


EventDefinition<TParam1,TParam2,TParam3>.Log 方法

定義

多載

Log<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>, TParam1, TParam2, TParam3, Exception)
已淘汰.

記錄事件,如果事件已設定為視為錯誤,則會擲回 。

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

記錄事件,如果事件已設定為視為錯誤,則會擲回 。

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

來源:
EventDefinition%60%60%60.cs
來源:
EventDefinition%60%60%60.cs
來源:
EventDefinition%60%60%60.cs
來源:
EventDefinition%60%60%60.cs
來源:
EventDefinition%60%60%60.cs
來源:
EventDefinition%60%60%60.cs
來源:
EventDefinition%60%60%60.cs

警告

Use the other overload

記錄事件,如果事件已設定為視為錯誤,則會擲回 。

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

類型參數

TLoggerCategory

DbLoggerCategory

參數

logger
IDiagnosticsLogger<TLoggerCategory>

應該記錄事件的記錄器。

arg1
TParam1

第一個訊息引數。

arg2
TParam2

第二個訊息引數。

arg3
TParam3

第三個訊息引數。

exception
Exception

與事件相關聯的選擇性例外狀況。

屬性

適用於

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

來源:
EventDefinition%60%60%60.cs
來源:
EventDefinition%60%60%60.cs
來源:
EventDefinition%60%60%60.cs
來源:
EventDefinition%60%60%60.cs

記錄事件,如果事件已設定為視為錯誤,則會擲回 。

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

類型參數

TLoggerCategory

DbLoggerCategory

參數

logger
IDiagnosticsLogger<TLoggerCategory>

應該記錄事件的記錄器。

warningBehavior
WarningBehavior

是否應該記錄事件,以例外狀況擲回或忽略。

arg1
TParam1

第一個訊息引數。

arg2
TParam2

第二個訊息引數。

arg3
TParam3

第三個訊息引數。

exception
Exception

與事件相關聯的選擇性例外狀況。

適用於