Compartir a través de


HttpLoggingServiceExtensions.AddHttpLogEnricher<T> Método

Definición

Agrega una instancia de enriquecedor de T a IServiceCollection para enriquecer los registros de solicitudes HTTP entrantes.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpLogEnricher<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where T : class, Microsoft.AspNetCore.Telemetry.IHttpLogEnricher;
static member AddHttpLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'T : null and 'T :> Microsoft.AspNetCore.Telemetry.IHttpLogEnricher)
<Extension()>
Public Function AddHttpLogEnricher(Of T As {Class, IHttpLogEnricher}) (services As IServiceCollection) As IServiceCollection

Parámetros de tipo

T

Tipo de enriquecidor.

Parámetros

services
IServiceCollection

que IServiceCollection se va a agregar a la instancia de T .

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Excepciones

services es null.

Se aplica a