HttpClientLoggingServiceCollectionExtensions.AddExtendedHttpClientLogging Metod

Definition

Överlagringar

Name Description
AddExtendedHttpClientLogging(IServiceCollection)

Lägger till en IHttpClientAsyncLogger för att generera loggar för utgående begäranden för alla HTTP-klienter som skapats med IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

Lägger till en IHttpClientAsyncLogger för att generera loggar för utgående begäranden för alla HTTP-klienter som skapats med IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

Lägger till en IHttpClientAsyncLogger för att generera loggar för utgående begäranden för alla HTTP-klienter som skapats med IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection)

Källa:
HttpClientLoggingServiceCollectionExtensions.cs
Källa:
HttpClientLoggingServiceCollectionExtensions.cs

Lägger till en IHttpClientAsyncLogger för att generera loggar för utgående begäranden för alla HTTP-klienter som skapats med 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

Parametrar

Returer

Värdet för services.

Undantag

Argumentet services är null.

Kommentarer

Alla andra loggare tas bort – inklusive standardloggen som registreras via AddDefaultLogger(IHttpClientBuilder).

Gäller för

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

Källa:
HttpClientLoggingServiceCollectionExtensions.cs
Källa:
HttpClientLoggingServiceCollectionExtensions.cs

Lägger till en IHttpClientAsyncLogger för att generera loggar för utgående begäranden för alla HTTP-klienter som skapats med 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

Parametrar

section
IConfigurationSection

Att IConfigurationSection använda för att LoggingOptionskonfigurera .

Returer

Värdet för services.

Undantag

Något av argumenten är null.

Kommentarer

Alla andra loggare tas bort – inklusive standardloggen som registreras via AddDefaultLogger(IHttpClientBuilder).

Gäller för

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

Källa:
HttpClientLoggingServiceCollectionExtensions.cs
Källa:
HttpClientLoggingServiceCollectionExtensions.cs

Lägger till en IHttpClientAsyncLogger för att generera loggar för utgående begäranden för alla HTTP-klienter som skapats med 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

Parametrar

configure
Action<LoggingOptions>

Ombudet som ska konfigureras LoggingOptions med.

Returer

Värdet för services.

Undantag

Något av argumenten är null.

Kommentarer

Alla andra loggare tas bort – inklusive standardloggen som registreras via AddDefaultLogger(IHttpClientBuilder).

Gäller för