EventLoggerFactoryExtensions.AddEventLog EventLoggerFactoryExtensions.AddEventLog EventLoggerFactoryExtensions.AddEventLog Method

Definition

Overloads

AddEventLog(ILoggerFactory) AddEventLog(ILoggerFactory) AddEventLog(ILoggerFactory)

Adds an event logger that is enabled for LogLevel.Information or higher.

AddEventLog(ILoggingBuilder) AddEventLog(ILoggingBuilder) AddEventLog(ILoggingBuilder)

Adds an event logger named 'EventLog' to the factory.

AddEventLog(ILoggerFactory, EventLogSettings) AddEventLog(ILoggerFactory, EventLogSettings) AddEventLog(ILoggerFactory, EventLogSettings)

Adds an event logger. Use settings to enable logging for specific LogLevels.

AddEventLog(ILoggerFactory, LogLevel) AddEventLog(ILoggerFactory, LogLevel) AddEventLog(ILoggerFactory, LogLevel)

Adds an event logger that is enabled for LogLevels of minLevel or higher.

AddEventLog(ILoggingBuilder, EventLogSettings) AddEventLog(ILoggingBuilder, EventLogSettings) AddEventLog(ILoggingBuilder, EventLogSettings)

Adds an event logger. Use settings to enable logging for specific LogLevels.

AddEventLog(ILoggerFactory) AddEventLog(ILoggerFactory) AddEventLog(ILoggerFactory)

Warning

This API is now obsolete.

Adds an event logger that is enabled for LogLevel.Information or higher.

[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
<Extension()>
Public Function AddEventLog (factory As ILoggerFactory) As ILoggerFactory

Parameters

factory
ILoggerFactory ILoggerFactory ILoggerFactory

The extension method argument.

Returns

AddEventLog(ILoggingBuilder) AddEventLog(ILoggingBuilder) AddEventLog(ILoggingBuilder)

Adds an event logger named 'EventLog' to the factory.

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

Parameters

builder
ILoggingBuilder ILoggingBuilder ILoggingBuilder

The extension method argument.

Returns

AddEventLog(ILoggerFactory, EventLogSettings) AddEventLog(ILoggerFactory, EventLogSettings) AddEventLog(ILoggerFactory, EventLogSettings)

Warning

This API is now obsolete.

Adds an event logger. Use settings to enable logging for specific LogLevels.

[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
<Extension()>
Public Function AddEventLog (factory As ILoggerFactory, settings As EventLogSettings) As ILoggerFactory

Parameters

factory
ILoggerFactory ILoggerFactory ILoggerFactory

The extension method argument.

Returns

AddEventLog(ILoggerFactory, LogLevel) AddEventLog(ILoggerFactory, LogLevel) AddEventLog(ILoggerFactory, LogLevel)

Warning

This API is now obsolete.

Adds an event logger that is enabled for LogLevels of minLevel or higher.

[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
<Extension()>
Public Function AddEventLog (factory As ILoggerFactory, minLevel As LogLevel) As ILoggerFactory

Parameters

factory
ILoggerFactory ILoggerFactory ILoggerFactory

The extension method argument.

minLevel
LogLevel LogLevel LogLevel

The minimum LogLevel to be logged

Returns

AddEventLog(ILoggingBuilder, EventLogSettings) AddEventLog(ILoggingBuilder, EventLogSettings) AddEventLog(ILoggingBuilder, EventLogSettings)

Adds an event logger. Use settings to enable logging for specific LogLevels.

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

Parameters

builder
ILoggingBuilder ILoggingBuilder ILoggingBuilder

The extension method argument.

Returns

Applies to