Condividi tramite


HttpClientLoggingServiceCollectionExtensions.AddExtendedHttpClientLogging Metodo

Definizione

Overload

AddExtendedHttpClientLogging(IServiceCollection)

Aggiunge un IHttpClientAsyncLogger oggetto per generare log per le richieste in uscita per tutti i client HTTP creati con IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

Aggiunge un IHttpClientAsyncLogger oggetto per generare log per le richieste in uscita per tutti i client HTTP creati con IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

Aggiunge un IHttpClientAsyncLogger oggetto per generare log per le richieste in uscita per tutti i client HTTP creati con IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection)

Origine:
HttpClientLoggingServiceCollectionExtensions.cs

Aggiunge un IHttpClientAsyncLogger oggetto per generare log per le richieste in uscita per tutti i client HTTP creati 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

Parametri

Restituisce

Valore di services.

Eccezioni

L'argomento services è null.

Commenti

Tutti gli altri logger vengono rimossi, incluso quello predefinito, registrato tramite AddDefaultLogger(IHttpClientBuilder).

Si applica a

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

Origine:
HttpClientLoggingServiceCollectionExtensions.cs

Aggiunge un IHttpClientAsyncLogger oggetto per generare log per le richieste in uscita per tutti i client HTTP creati 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

Parametri

section
IConfigurationSection

Oggetto IConfigurationSection da utilizzare per la configurazione di LoggingOptions.

Restituisce

Valore di services.

Eccezioni

Qualsiasi argomento è null.

Commenti

Tutti gli altri logger vengono rimossi, incluso quello predefinito, registrato tramite AddDefaultLogger(IHttpClientBuilder).

Si applica a

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

Origine:
HttpClientLoggingServiceCollectionExtensions.cs

Aggiunge un IHttpClientAsyncLogger oggetto per generare log per le richieste in uscita per tutti i client HTTP creati 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

Parametri

configure
Action<LoggingOptions>

Delegato da configurare LoggingOptions con.

Restituisce

Valore di services.

Eccezioni

Qualsiasi argomento è null.

Commenti

Tutti gli altri logger vengono rimossi, incluso quello predefinito, registrato tramite AddDefaultLogger(IHttpClientBuilder).

Si applica a