EventLoggerFactoryExtensions.AddEventLog 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddEventLog(ILoggingBuilder) |
將名為 'EventLog' 的事件記錄器新增至 Factory。 |
AddEventLog(ILoggingBuilder, EventLogSettings) |
新增事件記錄器。 使用 |
AddEventLog(ILoggingBuilder, Action<EventLogSettings>) |
新增事件記錄器。 使用 |
AddEventLog(ILoggingBuilder)
將名為 'EventLog' 的事件記錄器新增至 Factory。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddEventLog(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventLog (this Microsoft.Extensions.Logging.ILoggingBuilder builder);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggingBuilder -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddEventLog (builder As ILoggingBuilder) As ILoggingBuilder
參數
- builder
- ILoggingBuilder
擴充方法引數。
傳回
ILoggingBuilder,以便鏈結其他呼叫。
適用於
AddEventLog(ILoggingBuilder, EventLogSettings)
新增事件記錄器。 使用 settings
來啟用特定 LogLevel 的記錄。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddEventLog(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Microsoft::Extensions::Logging::EventLog::EventLogSettings ^ settings);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventLog (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Microsoft.Extensions.Logging.EventLog.EventLogSettings settings);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggingBuilder * Microsoft.Extensions.Logging.EventLog.EventLogSettings -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddEventLog (builder As ILoggingBuilder, settings As EventLogSettings) As ILoggingBuilder
參數
- builder
- ILoggingBuilder
擴充方法引數。
- settings
- EventLogSettings
傳回
ILoggingBuilder,以便鏈結其他呼叫。
適用於
AddEventLog(ILoggingBuilder, Action<EventLogSettings>)
新增事件記錄器。 使用 configure
來啟用特定 LogLevel 的記錄。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddEventLog(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Action<Microsoft::Extensions::Logging::EventLog::EventLogSettings ^> ^ configure);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventLog (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Action<Microsoft.Extensions.Logging.EventLog.EventLogSettings> configure);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggingBuilder * Action<Microsoft.Extensions.Logging.EventLog.EventLogSettings> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddEventLog (builder As ILoggingBuilder, configure As Action(Of EventLogSettings)) As ILoggingBuilder
參數
- builder
- ILoggingBuilder
擴充方法引數。
- configure
- Action<EventLogSettings>
設定 EventLogSettings 的委派。
傳回
ILoggingBuilder,以便鏈結其他呼叫。