EventLoggerFactoryExtensions.AddEventLog 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddEventLog(ILoggingBuilder) |
将名为“EventLog”的事件记录器添加到工厂。 |
AddEventLog(ILoggingBuilder, EventLogSettings) |
添加事件记录器。 使用 |
AddEventLog(ILoggingBuilder, Action<EventLogSettings>) |
添加事件记录器。 使用 |
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,以便可以链接其他调用。
适用于
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,以便可以链接其他调用。