EventLoggerFactoryExtensions.AddEventLog 方法

定义

重载

AddEventLog(ILoggingBuilder)

将名为“EventLog”的事件记录器添加到工厂。

AddEventLog(ILoggingBuilder, EventLogSettings)

添加事件记录器。 使用 settings 为特定 LogLevel启用日志记录。

AddEventLog(ILoggingBuilder, Action<EventLogSettings>)

添加事件记录器。 使用 configure 为特定 LogLevel启用日志记录。

AddEventLog(ILoggingBuilder)

Source:
EventLoggerFactoryExtensions.cs
Source:
EventLoggerFactoryExtensions.cs
Source:
EventLoggerFactoryExtensions.cs
Source:
EventLoggerFactoryExtensions.cs
Source:
EventLoggerFactoryExtensions.cs

将名为“EventLog”的事件记录器添加到工厂。

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)

Source:
EventLoggerFactoryExtensions.cs
Source:
EventLoggerFactoryExtensions.cs
Source:
EventLoggerFactoryExtensions.cs
Source:
EventLoggerFactoryExtensions.cs
Source:
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>)

Source:
EventLoggerFactoryExtensions.cs
Source:
EventLoggerFactoryExtensions.cs
Source:
EventLoggerFactoryExtensions.cs
Source:
EventLoggerFactoryExtensions.cs
Source:
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,以便可以链接其他调用。

适用于