Share via


HttpClientLoggingServiceCollectionExtensions.AddExtendedHttpClientLogging Method

Definition

Overloads

AddExtendedHttpClientLogging(IServiceCollection)

Adds an IHttpClientAsyncLogger to emit logs for outgoing requests for all HTTP clients created with IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

Adds an IHttpClientAsyncLogger to emit logs for outgoing requests for all HTTP clients created with IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

Adds an IHttpClientAsyncLogger to emit logs for outgoing requests for all HTTP clients created with IHttpClientFactory.

AddExtendedHttpClientLogging(IServiceCollection)

Source:
HttpClientLoggingServiceCollectionExtensions.cs
Source:
HttpClientLoggingServiceCollectionExtensions.cs
Source:
HttpClientLoggingServiceCollectionExtensions.cs

Adds an IHttpClientAsyncLogger to emit logs for outgoing requests for all HTTP clients created with 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

Parameters

Returns

The value of services.

Exceptions

Argument services is null.

Remarks

All other loggers are removed - including the default one, registered via AddDefaultLogger(IHttpClientBuilder).

Applies to

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

Source:
HttpClientLoggingServiceCollectionExtensions.cs
Source:
HttpClientLoggingServiceCollectionExtensions.cs
Source:
HttpClientLoggingServiceCollectionExtensions.cs

Adds an IHttpClientAsyncLogger to emit logs for outgoing requests for all HTTP clients created with 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

Parameters

section
IConfigurationSection

The IConfigurationSection to use for configuring LoggingOptions.

Returns

The value of services.

Exceptions

Any of the arguments is null.

Remarks

All other loggers are removed - including the default one, registered via AddDefaultLogger(IHttpClientBuilder).

Applies to

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

Source:
HttpClientLoggingServiceCollectionExtensions.cs
Source:
HttpClientLoggingServiceCollectionExtensions.cs
Source:
HttpClientLoggingServiceCollectionExtensions.cs

Adds an IHttpClientAsyncLogger to emit logs for outgoing requests for all HTTP clients created with 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

Parameters

configure
Action<LoggingOptions>

The delegate to configure LoggingOptions with.

Returns

The value of services.

Exceptions

Any of the arguments is null.

Remarks

All other loggers are removed - including the default one, registered via AddDefaultLogger(IHttpClientBuilder).

Applies to