EventLoggerFactoryExtensions.AddEventLog 方法
定义
重载
| AddEventLog(ILoggerFactory) |
已过时。
添加为 LogLevel.Information 或更高级别启用的事件记录器。Adds an event logger that is enabled for LogLevel.Information or higher. |
| AddEventLog(ILoggingBuilder) |
将名为“EventLog”的事件记录器添加到中心。Adds an event logger named 'EventLog' to the factory. |
| AddEventLog(ILoggerFactory, EventLogSettings) |
已过时。
添加事件记录器。Adds an event logger. 使用 |
| AddEventLog(ILoggerFactory, LogLevel) |
已过时。
添加为 minLevel 或更高级别的 LogLevel 启用的事件记录器。Adds an event logger that is enabled for LogLevels of minLevel or higher. |
| AddEventLog(ILoggingBuilder, EventLogSettings) |
添加事件记录器。Adds an event logger. 使用 |
| AddEventLog(ILoggingBuilder, Action<EventLogSettings>) |
添加事件记录器。Adds an event logger. 使用 |
AddEventLog(ILoggerFactory)
注意
This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).
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
扩展方法参数。The extension method argument.
返回
- 属性
适用于
AddEventLog(ILoggingBuilder)
将名为“EventLog”的事件记录器添加到中心。Adds an event logger named 'EventLog' to the 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
扩展方法参数。The extension method argument.
返回
ILoggingBuilder,以便可以链接其他调用。The ILoggingBuilder so that additional calls can be chained.
适用于
AddEventLog(ILoggerFactory, EventLogSettings)
注意
This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).
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
扩展方法参数。The extension method argument.
- settings
- EventLogSettings
返回
- 属性
适用于
AddEventLog(ILoggerFactory, LogLevel)
注意
This method is obsolete and will be removed in a future version. The recommended alternative is AddEventLog(this ILoggingBuilder builder).
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
扩展方法参数。The extension method argument.
返回
- 属性
适用于
AddEventLog(ILoggingBuilder, EventLogSettings)
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
扩展方法参数。The extension method argument.
- settings
- EventLogSettings
返回
ILoggingBuilder,以便可以链接其他调用。The ILoggingBuilder so that additional calls can be chained.
适用于
AddEventLog(ILoggingBuilder, Action<EventLogSettings>)
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
扩展方法参数。The extension method argument.
- configure
- Action<EventLogSettings>
用于配置 EventLogSettings 的委托。A delegate to configure the EventLogSettings.
返回
ILoggingBuilder,以便可以链接其他调用。The ILoggingBuilder so that additional calls can be chained.