Compartir a través de


HttpLoggingServiceExtensions.AddHttpLogging Método

Definición

Sobrecargas

AddHttpLogging(IServiceCollection)

Agrega componentes para el registro de solicitudes HTTP entrantes en IServiceCollection.

AddHttpLogging(IServiceCollection, IConfigurationSection)

Agrega componentes para el registro de solicitudes HTTP entrantes en IServiceCollection.

AddHttpLogging(IServiceCollection, Action<LoggingOptions>)

Agrega componentes para el registro de solicitudes HTTP entrantes en IServiceCollection.

AddHttpLogging(IServiceCollection)

Source:
HttpLoggingServiceExtensions.cs

Agrega componentes para el registro de solicitudes HTTP entrantes en 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se va a agregar el servicio.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Excepciones

services es null.

Se aplica a

AddHttpLogging(IServiceCollection, IConfigurationSection)

Source:
HttpLoggingServiceExtensions.cs

Agrega componentes para el registro de solicitudes HTTP entrantes en 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se va a agregar el servicio.

section
IConfigurationSection

Sección de configuración a la que se va a enlazar LoggingOptions .

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Excepciones

services o section es null.

Se aplica a

AddHttpLogging(IServiceCollection, Action<LoggingOptions>)

Source:
HttpLoggingServiceExtensions.cs

Agrega componentes para el registro de solicitudes HTTP entrantes en 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se va a agregar el servicio.

configure
Action<LoggingOptions>

Action<T> para configurar la instancia de LoggingOptions.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Excepciones

services o configure es null.

Se aplica a