EventSourceLoggerFactoryExtensions.AddEventSourceLogger Method

Definition

Overloads

AddEventSourceLogger(ILoggerFactory)

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)

Warning

This API is now obsolete.

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

Parameters

factory
ILoggerFactory

The extension method argument.

Returns

Attributes

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

The ILoggingBuilder so that additional calls can be chained.

Applies to