Dela via


HttpLoggingServiceExtensions.AddHttpLogging Method

Definition

Overloads

AddHttpLogging(IServiceCollection)

Adds components for incoming HTTP requests logging into IServiceCollection.

AddHttpLogging(IServiceCollection, IConfigurationSection)

Adds components for incoming HTTP requests logging into IServiceCollection.

AddHttpLogging(IServiceCollection, Action<LoggingOptions>)

Adds components for incoming HTTP requests logging into IServiceCollection.

AddHttpLogging(IServiceCollection)

Source:
HttpLoggingServiceExtensions.cs

Adds components for incoming HTTP requests logging into IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddHttpLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpLogging (services As IServiceCollection) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection to add the service to.

Returns

The IServiceCollection so that additional calls can be chained.

Exceptions

services is null.

Applies to

AddHttpLogging(IServiceCollection, IConfigurationSection)

Source:
HttpLoggingServiceExtensions.cs

Adds components for incoming HTTP requests logging into IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddHttpLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpLogging (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection to add the service to.

section
IConfigurationSection

The configuration section to bind LoggingOptions to.

Returns

The IServiceCollection so that additional calls can be chained.

Exceptions

Either services or section is null.

Applies to

AddHttpLogging(IServiceCollection, Action<LoggingOptions>)

Source:
HttpLoggingServiceExtensions.cs

Adds components for incoming HTTP requests logging into IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Telemetry.LoggingOptions> configure);
static member AddHttpLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Telemetry.LoggingOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpLogging (services As IServiceCollection, configure As Action(Of LoggingOptions)) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection to add the service to.

configure
Action<LoggingOptions>

An Action<T> to configure the LoggingOptions.

Returns

The IServiceCollection so that additional calls can be chained.

Exceptions

Either services or configure is null.

Applies to