共用方式為


EventLoggerFactoryExtensions.AddEventLog 方法

定義

多載

AddEventLog(ILoggingBuilder)

將名為 'EventLog' 的事件記錄器新增至 Factory。

AddEventLog(ILoggingBuilder, EventLogSettings)

新增事件記錄器。 使用 settings 來啟用特定 LogLevel 的記錄。

AddEventLog(ILoggingBuilder, Action<EventLogSettings>)

新增事件記錄器。 使用 configure 來啟用特定 LogLevel 的記錄。

AddEventLog(ILoggingBuilder)

來源:
EventLoggerFactoryExtensions.cs
來源:
EventLoggerFactoryExtensions.cs
來源:
EventLoggerFactoryExtensions.cs

將名為 '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)

來源:
EventLoggerFactoryExtensions.cs
來源:
EventLoggerFactoryExtensions.cs
來源:
EventLoggerFactoryExtensions.cs

新增事件記錄器。 使用 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

擴充方法引數。

傳回

ILoggingBuilder,以便鏈結其他呼叫。

適用於

AddEventLog(ILoggingBuilder, Action<EventLogSettings>)

來源:
EventLoggerFactoryExtensions.cs
來源:
EventLoggerFactoryExtensions.cs
來源:
EventLoggerFactoryExtensions.cs

新增事件記錄器。 使用 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,以便鏈結其他呼叫。

適用於