EventLoggerFactoryExtensions.AddEventLog 方法

定义

重载

AddEventLog(ILoggerFactory)
已过时。

添加为 LogLevel.Information 或更高级别启用的事件记录器。

AddEventLog(ILoggingBuilder)

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

AddEventLog(ILoggerFactory, EventLogSettings)
已过时。

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

AddEventLog(ILoggerFactory, LogLevel)
已过时。

添加为 minLevel 或更高级别的 LogLevel 启用的事件记录器。

AddEventLog(ILoggingBuilder, EventLogSettings)

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

AddEventLog(ILoggingBuilder, Action<EventLogSettings>)

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

AddEventLog(ILoggerFactory)

注意

This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).

添加为 LogLevel.Information 或更高级别启用的事件记录器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddEventLog(Microsoft::Extensions::Logging::ILoggerFactory ^ factory);
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Extensions.Logging.ILoggerFactory
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")>]
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddEventLog (factory As ILoggerFactory) As ILoggerFactory

参数

factory
ILoggerFactory

扩展方法参数。

返回

ILoggerFactory
属性

适用于

AddEventLog(ILoggingBuilder)

将名为“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

ILoggingBuilder,以便可以链接其他调用。

适用于

AddEventLog(ILoggerFactory, EventLogSettings)

注意

This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).

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

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddEventLog(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, Microsoft::Extensions::Logging::EventLog::EventLogSettings ^ settings);
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.EventLog.EventLogSettings settings);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.EventLog.EventLogSettings settings);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.EventLog.EventLogSettings -> Microsoft.Extensions.Logging.ILoggerFactory
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")>]
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.EventLog.EventLogSettings -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddEventLog (factory As ILoggerFactory, settings As EventLogSettings) As ILoggerFactory

参数

factory
ILoggerFactory

扩展方法参数。

返回

ILoggerFactory
属性

适用于

AddEventLog(ILoggerFactory, LogLevel)

注意

This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).

添加为 minLevel 或更高级别的 LogLevel 启用的事件记录器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddEventLog(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, Microsoft::Extensions::Logging::LogLevel minLevel);
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.LogLevel minLevel);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddEventLog (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.LogLevel minLevel);
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.LogLevel -> Microsoft.Extensions.Logging.ILoggerFactory
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).")>]
static member AddEventLog : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.LogLevel -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddEventLog (factory As ILoggerFactory, minLevel As LogLevel) As ILoggerFactory

参数

factory
ILoggerFactory

扩展方法参数。

minLevel
LogLevel

要记录的最小值 LogLevel

返回

ILoggerFactory
属性

适用于

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

扩展方法参数。

返回

ILoggingBuilder

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

ILoggingBuilder,以便可以链接其他调用。

适用于