共用方式為


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

定義

多載

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

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

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

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

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

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

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

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

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

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

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

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

類型參數

TLoggerCategory

DbLoggerCategory

參數

logger
IDiagnosticsLogger<TLoggerCategory>

事件應該記錄到其中的記錄器。

arg1
TParam1

第一個訊息引數。

arg2
TParam2

第二個訊息引數。

arg3
TParam3

第三個訊息引數。

arg4
TParam4

第四個訊息引數。

適用於

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

來源:
EventDefinition%60%60%60%60.cs
來源:
EventDefinition%60%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, TParam4 arg4) 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 * 'TParam4 -> 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 * 'TParam4 -> 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, arg4 As TParam4)

類型參數

TLoggerCategory

DbLoggerCategory

參數

logger
IDiagnosticsLogger<TLoggerCategory>

事件應該記錄到其中的記錄器。

warningBehavior
WarningBehavior

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

arg1
TParam1

第一個訊息引數。

arg2
TParam2

第二個訊息引數。

arg3
TParam3

第三個訊息引數。

arg4
TParam4

第四個訊息引數。

適用於

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

來源:
EventDefinition%60%60%60%60.cs
來源:
EventDefinition%60%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, TParam4 arg4, 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, TParam4 arg4, 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 * 'TParam4 * 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 * 'TParam4 * 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 * 'TParam4 * 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 * 'TParam4 * 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, arg4 As TParam4, Optional exception As Exception = Nothing)

類型參數

TLoggerCategory

DbLoggerCategory

參數

logger
IDiagnosticsLogger<TLoggerCategory>

事件應該記錄到其中的記錄器。

arg1
TParam1

第一個訊息引數。

arg2
TParam2

第二個訊息引數。

arg3
TParam3

第三個訊息引數。

arg4
TParam4

第四個訊息引數。

exception
Exception

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

屬性

適用於

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

來源:
EventDefinition%60%60%60%60.cs
來源:
EventDefinition%60%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, TParam4 arg4, 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 * 'TParam4 * 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 * 'TParam4 * 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, arg4 As TParam4, Optional exception As Exception = Nothing)

類型參數

TLoggerCategory

DbLoggerCategory

參數

logger
IDiagnosticsLogger<TLoggerCategory>

事件應該記錄到其中的記錄器。

warningBehavior
WarningBehavior

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

arg1
TParam1

第一個訊息引數。

arg2
TParam2

第二個訊息引數。

arg3
TParam3

第三個訊息引數。

arg4
TParam4

第四個訊息引數。

exception
Exception

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

適用於