共用方式為


EventDefinition<TParam> 建構函式

定義

多載

EventDefinition<TParam>(EventId, LogLevel, Action<ILogger,TParam,Exception>)

建立事件定義實例。

EventDefinition<TParam>(EventId, LogLevel, String, Action<ILogger,TParam,Exception>)

建立事件定義實例。

EventDefinition<TParam>(ILoggingOptions, EventId, LogLevel, String, Func<LogLevel,Action<ILogger,TParam,Exception>>)

建立事件定義實例。

EventDefinition<TParam>(EventId, LogLevel, Action<ILogger,TParam,Exception>)

建立事件定義實例。

public EventDefinition (Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel level, Action<Microsoft.Extensions.Logging.ILogger,TParam,Exception> logAction);
new Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'Param> : Microsoft.Extensions.Logging.EventId * Microsoft.Extensions.Logging.LogLevel * Action<Microsoft.Extensions.Logging.ILogger, 'Param, Exception> -> Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'Param>
Public Sub New (eventId As EventId, level As LogLevel, logAction As Action(Of ILogger, TParam, Exception))

參數

eventId
EventId

EventId

level
LogLevel

LogLevel 記錄事件的 。

logAction
Action<ILogger,TParam,Exception>

用於記錄事件的快取委派。

適用於

EventDefinition<TParam>(EventId, LogLevel, String, Action<ILogger,TParam,Exception>)

建立事件定義實例。

public EventDefinition (Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel level, string eventIdCode, Action<Microsoft.Extensions.Logging.ILogger,TParam,Exception> logAction);
new Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'Param> : Microsoft.Extensions.Logging.EventId * Microsoft.Extensions.Logging.LogLevel * string * Action<Microsoft.Extensions.Logging.ILogger, 'Param, Exception> -> Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'Param>
Public Sub New (eventId As EventId, level As LogLevel, eventIdCode As String, logAction As Action(Of ILogger, TParam, Exception))

參數

eventId
EventId

EventId

level
LogLevel

LogLevel 記錄事件的 。

eventIdCode
String

字串,表示應該傳遞至 ConfigureWanings 的程式碼。

logAction
Action<ILogger,TParam,Exception>

用於記錄事件的快取委派。

適用於

EventDefinition<TParam>(ILoggingOptions, EventId, LogLevel, String, Func<LogLevel,Action<ILogger,TParam,Exception>>)

建立事件定義實例。

public EventDefinition (Microsoft.EntityFrameworkCore.Diagnostics.ILoggingOptions loggingOptions, Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel level, string eventIdCode, Func<Microsoft.Extensions.Logging.LogLevel,Action<Microsoft.Extensions.Logging.ILogger,TParam,Exception>> logActionFunc);
public EventDefinition (Microsoft.EntityFrameworkCore.Diagnostics.ILoggingOptions loggingOptions, Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel level, string eventIdCode, Func<Microsoft.Extensions.Logging.LogLevel,Action<Microsoft.Extensions.Logging.ILogger,TParam,Exception?>> logActionFunc);
new Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'Param> : Microsoft.EntityFrameworkCore.Diagnostics.ILoggingOptions * Microsoft.Extensions.Logging.EventId * Microsoft.Extensions.Logging.LogLevel * string * Func<Microsoft.Extensions.Logging.LogLevel, Action<Microsoft.Extensions.Logging.ILogger, 'Param, Exception>> -> Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'Param>
Public Sub New (loggingOptions As ILoggingOptions, eventId As EventId, level As LogLevel, eventIdCode As String, logActionFunc As Func(Of LogLevel, Action(Of ILogger, TParam, Exception)))

參數

loggingOptions
ILoggingOptions

記錄選項。

eventId
EventId

EventId

level
LogLevel

LogLevel 記錄事件的 。

eventIdCode
String

字串,表示應該傳遞至 ConfigureWarnings(Action<WarningsConfigurationBuilder>) 的程式碼。

logActionFunc
Func<LogLevel,Action<ILogger,TParam,Exception>>

用來建立用於記錄事件的快取委派的函式。

適用於