EventSourceLoggerFactoryExtensions.AddEventSourceLogger Method

Definition

Overloads

AddEventSourceLogger(ILoggerFactory)
Obsolete.

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

AddEventSourceLogger(ILoggingBuilder)

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

AddEventSourceLogger(ILoggerFactory)

Caution

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

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

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

Parameters

factory
ILoggerFactory

The extension method argument.

Returns

ILoggerFactory
Attributes

Applies to

AddEventSourceLogger(ILoggingBuilder)

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

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddEventSourceLogger(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventSourceLogger (this Microsoft.Extensions.Logging.ILoggingBuilder builder);
static member AddEventSourceLogger : Microsoft.Extensions.Logging.ILoggingBuilder -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddEventSourceLogger (builder As ILoggingBuilder) As ILoggingBuilder

Parameters

builder
ILoggingBuilder

The extension method argument.

Returns

ILoggingBuilder

The ILoggingBuilder so that additional calls can be chained.

Applies to