LoggingBuilderExtensions.AddProvider(ILoggingBuilder, ILoggerProvider) Method

Definition

Adds the given ILoggerProvider to the ILoggingBuilder

C#
public static Microsoft.Extensions.Logging.ILoggingBuilder AddProvider(this Microsoft.Extensions.Logging.ILoggingBuilder builder, Microsoft.Extensions.Logging.ILoggerProvider provider);

Parameters

builder
ILoggingBuilder

The ILoggingBuilder to add the provider to.

provider
ILoggerProvider

The ILoggerProvider to add to the builder.

Returns

The ILoggingBuilder so that additional calls can be chained.

Applies to

Produit Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)