HttpClientLoggingServiceCollectionExtensions.AddHttpClientLogEnricher<T> Method

Definition

Adds an enricher instance of T to the IServiceCollection to enrich HttpClient logs.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpClientLogEnricher<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where T : class, Microsoft.Extensions.Http.Logging.IHttpClientLogEnricher;

Type Parameters

T

Type of enricher.

Parameters

services
IServiceCollection

The IServiceCollection to add the instance of T to.

Returns

The value of services.

Applies to

Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)