HttpLoggingServiceExtensions.AddHttpLogging 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.
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)
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)
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>)
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
.