Compartir vía


HttpClientLoggingServiceCollectionExtensions.AddExtendedHttpClientLogging Método

Definición

Sobrecargas

AddExtendedHttpClientLogging(IServiceCollection)

Agrega un IHttpClientAsyncLogger objeto para emitir registros para las solicitudes salientes de todos los clientes HTTP creados con IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

Agrega un IHttpClientAsyncLogger objeto para emitir registros para las solicitudes salientes de todos los clientes HTTP creados con IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

Agrega un IHttpClientAsyncLogger objeto para emitir registros para las solicitudes salientes de todos los clientes HTTP creados con IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection)

Source:
HttpClientLoggingServiceCollectionExtensions.cs

Agrega un IHttpClientAsyncLogger objeto para emitir registros para las solicitudes salientes de todos los clientes HTTP creados con IHttpClientFactory.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddExtendedHttpClientLogging(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddExtendedHttpClientLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddExtendedHttpClientLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddExtendedHttpClientLogging (services As IServiceCollection) As IServiceCollection

Parámetros

services
IServiceCollection

El parámetro de cadena de consulta IServiceCollection.

Devoluciones

El valor de services.

Excepciones

El argumento services es null.

Comentarios

Se quitan todos los demás registradores, incluido el predeterminado, registrado a través de AddDefaultLogger(IHttpClientBuilder).

Se aplica a

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

Source:
HttpClientLoggingServiceCollectionExtensions.cs

Agrega un IHttpClientAsyncLogger objeto para emitir registros para las solicitudes salientes de todos los clientes HTTP creados con IHttpClientFactory.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddExtendedHttpClientLogging(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfigurationSection ^ section);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddExtendedHttpClientLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddExtendedHttpClientLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddExtendedHttpClientLogging (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection

Parámetros

services
IServiceCollection

El parámetro de cadena de consulta IServiceCollection.

section
IConfigurationSection

que IConfigurationSection se va a usar para configurar LoggingOptions.

Devoluciones

El valor de services.

Excepciones

Cualquiera de los argumentos es null.

Comentarios

Se quitan todos los demás registradores, incluido el predeterminado, registrado a través de AddDefaultLogger(IHttpClientBuilder).

Se aplica a

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

Source:
HttpClientLoggingServiceCollectionExtensions.cs

Agrega un IHttpClientAsyncLogger objeto para emitir registros para las solicitudes salientes de todos los clientes HTTP creados con IHttpClientFactory.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddExtendedHttpClientLogging(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Http::Logging::LoggingOptions ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddExtendedHttpClientLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Http.Logging.LoggingOptions> configure);
static member AddExtendedHttpClientLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Http.Logging.LoggingOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddExtendedHttpClientLogging (services As IServiceCollection, configure As Action(Of LoggingOptions)) As IServiceCollection

Parámetros

services
IServiceCollection

El parámetro de cadena de consulta IServiceCollection.

configure
Action<LoggingOptions>

Delegado con el que se va a configurar LoggingOptions .

Devoluciones

El valor de services.

Excepciones

Cualquiera de los argumentos es null.

Comentarios

Se quitan todos los demás registradores, incluido el predeterminado, registrado a través de AddDefaultLogger(IHttpClientBuilder).

Se aplica a