HttpClientLoggingServiceCollectionExtensions.AddExtendedHttpClientLogging メソッド

定義

オーバーロード

AddExtendedHttpClientLogging(IServiceCollection)

IHttpClientAsyncLogger 使用して作成されたすべての HTTP クライアントの送信要求のログを出力 IHttpClientFactoryする を追加します。

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

IHttpClientAsyncLogger 使用して作成されたすべての HTTP クライアントの送信要求のログを出力 IHttpClientFactoryする を追加します。

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

IHttpClientAsyncLogger 使用して作成されたすべての HTTP クライアントの送信要求のログを出力 IHttpClientFactoryする を追加します。

AddExtendedHttpClientLogging(IServiceCollection)

ソース:
HttpClientLoggingServiceCollectionExtensions.cs

IHttpClientAsyncLogger 使用して作成されたすべての HTTP クライアントの送信要求のログを出力 IHttpClientFactoryする を追加します。

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddExtendedHttpClientLogging(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);

パラメーター

戻り値

services の値。

例外

引数 services は です null

注釈

他のすべてのロガーは削除されます。既定のロガーを含め、 を介して AddDefaultLogger(IHttpClientBuilder)登録されます。

適用対象

.NET 10 (package-provided) およびその他のバージョン
製品 バージョン
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

ソース:
HttpClientLoggingServiceCollectionExtensions.cs

IHttpClientAsyncLogger 使用して作成されたすべての HTTP クライアントの送信要求のログを出力 IHttpClientFactoryする を追加します。

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddExtendedHttpClientLogging(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);

パラメーター

section
IConfigurationSection

IConfigurationSection 構成 LoggingOptionsに使用する 。

戻り値

services の値。

例外

引数のいずれも です null

注釈

他のすべてのロガーは削除されます。既定のロガーを含め、 を介して AddDefaultLogger(IHttpClientBuilder)登録されます。

適用対象

.NET 10 (package-provided) およびその他のバージョン
製品 バージョン
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

ソース:
HttpClientLoggingServiceCollectionExtensions.cs

IHttpClientAsyncLogger 使用して作成されたすべての HTTP クライアントの送信要求のログを出力 IHttpClientFactoryする を追加します。

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddExtendedHttpClientLogging(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Http.Logging.LoggingOptions> configure);

パラメーター

configure
Action<LoggingOptions>

構成 LoggingOptions するデリゲート。

戻り値

services の値。

例外

引数のいずれも です null

注釈

他のすべてのロガーは削除されます。既定のロガーを含め、 を介して AddDefaultLogger(IHttpClientBuilder)登録されます。

適用対象

.NET 10 (package-provided) およびその他のバージョン
製品 バージョン
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)