EventDefinition<TParam1,TParam2,TParam3> 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
EventDefinition<TParam1,TParam2,TParam3>(EventId, LogLevel, Action<ILogger,TParam1,TParam2,TParam3,Exception>)
建立事件定義實例。
public EventDefinition (Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel level, Action<Microsoft.Extensions.Logging.ILogger,TParam1,TParam2,TParam3,Exception> logAction);
new Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'TParam1, 'TParam2, 'TParam3> : Microsoft.Extensions.Logging.EventId * Microsoft.Extensions.Logging.LogLevel * Action<Microsoft.Extensions.Logging.ILogger, 'TParam1, 'TParam2, 'TParam3, Exception> -> Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'TParam1, 'TParam2, 'TParam3>
Public Sub New (eventId As EventId, level As LogLevel, logAction As Action(Of ILogger, TParam1, TParam2, TParam3, Exception))
參數
適用於
EventDefinition<TParam1,TParam2,TParam3>(EventId, LogLevel, String, Action<ILogger,TParam1,TParam2,TParam3,Exception>)
建立事件定義實例。
public EventDefinition (Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel level, string eventIdCode, Action<Microsoft.Extensions.Logging.ILogger,TParam1,TParam2,TParam3,Exception> logAction);
new Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'TParam1, 'TParam2, 'TParam3> : Microsoft.Extensions.Logging.EventId * Microsoft.Extensions.Logging.LogLevel * string * Action<Microsoft.Extensions.Logging.ILogger, 'TParam1, 'TParam2, 'TParam3, Exception> -> Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'TParam1, 'TParam2, 'TParam3>
Public Sub New (eventId As EventId, level As LogLevel, eventIdCode As String, logAction As Action(Of ILogger, TParam1, TParam2, TParam3, Exception))
參數
- eventIdCode
- String
字串,表示應該傳遞至 ConfigureWanings 的程式碼。
適用於
EventDefinition<TParam1,TParam2,TParam3>(ILoggingOptions, EventId, LogLevel, String, Func<LogLevel,Action<ILogger,TParam1,TParam2, TParam3,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,TParam1,TParam2,TParam3,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,TParam1,TParam2,TParam3,Exception?>> logActionFunc);
new Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'TParam1, 'TParam2, 'TParam3> : Microsoft.EntityFrameworkCore.Diagnostics.ILoggingOptions * Microsoft.Extensions.Logging.EventId * Microsoft.Extensions.Logging.LogLevel * string * Func<Microsoft.Extensions.Logging.LogLevel, Action<Microsoft.Extensions.Logging.ILogger, 'TParam1, 'TParam2, 'TParam3, Exception>> -> Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<'TParam1, 'TParam2, 'TParam3>
Public Sub New (loggingOptions As ILoggingOptions, eventId As EventId, level As LogLevel, eventIdCode As String, logActionFunc As Func(Of LogLevel, Action(Of ILogger, TParam1, TParam2, TParam3, Exception)))
參數
- loggingOptions
- ILoggingOptions
記錄選項。
- eventIdCode
- String
字串,表示應該傳遞至 ConfigureWarnings(Action<WarningsConfigurationBuilder>) 的程式碼。