HttpLoggingServiceExtensions.AddHttpLogEnricher<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an enricher instance of T
to the IServiceCollection to enrich incoming HTTP requests logs.
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
Type Parameters
- T
Type of enricher.
Parameters
- services
- IServiceCollection
The IServiceCollection to add the instance of T
to.
Returns
The IServiceCollection so that additional calls can be chained.
Exceptions
services
is null
.