共用方式為


HttpClientLoggingHttpClientBuilderExtensions.AddExtendedHttpClientLogging 方法

定義

多載

AddExtendedHttpClientLogging(IHttpClientBuilder)

加入 , IHttpClientAsyncLogger 以針對具名 HttpClient的傳出要求發出記錄。

AddExtendedHttpClientLogging(IHttpClientBuilder, IConfigurationSection)

加入 , IHttpClientAsyncLogger 以針對具名 HttpClient的傳出要求發出記錄。

AddExtendedHttpClientLogging(IHttpClientBuilder, Action<LoggingOptions>)

加入 , IHttpClientAsyncLogger 以針對具名 HttpClient的傳出要求發出記錄。

AddExtendedHttpClientLogging(IHttpClientBuilder)

來源:
HttpClientLoggingHttpClientBuilderExtensions.cs
來源:
HttpClientLoggingHttpClientBuilderExtensions.cs
來源:
HttpClientLoggingHttpClientBuilderExtensions.cs

加入 , IHttpClientAsyncLogger 以針對具名 HttpClient的傳出要求發出記錄。

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

參數

傳回

builder 的值。

例外狀況

自變數 buildernull

備註

會移除所有其他記錄器,包括透過 AddDefaultLogger(IHttpClientBuilder)註冊的默認記錄器。 這個方法所記錄的許多資訊 (,例如主體、方法、主機、路徑和持續時間) ,都會新增為結構化記錄檔的擴充標記。 請確定您有檢視結構化記錄的方式,才能檢視這項額外資訊。

適用於

AddExtendedHttpClientLogging(IHttpClientBuilder, IConfigurationSection)

來源:
HttpClientLoggingHttpClientBuilderExtensions.cs
來源:
HttpClientLoggingHttpClientBuilderExtensions.cs
來源:
HttpClientLoggingHttpClientBuilderExtensions.cs

加入 , IHttpClientAsyncLogger 以針對具名 HttpClient的傳出要求發出記錄。

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

參數

傳回

builder 的值。

例外狀況

任何自變數都是 null

備註

會移除所有其他記錄器,包括透過 AddDefaultLogger(IHttpClientBuilder)註冊的默認記錄器。 這個方法所記錄的許多資訊 (,例如主體、方法、主機、路徑和持續時間) ,都會新增為結構化記錄檔的擴充標記。 請確定您有檢視結構化記錄的方式,才能檢視這項額外資訊。

適用於

AddExtendedHttpClientLogging(IHttpClientBuilder, Action<LoggingOptions>)

來源:
HttpClientLoggingHttpClientBuilderExtensions.cs
來源:
HttpClientLoggingHttpClientBuilderExtensions.cs
來源:
HttpClientLoggingHttpClientBuilderExtensions.cs

加入 , IHttpClientAsyncLogger 以針對具名 HttpClient的傳出要求發出記錄。

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

參數

configure
Action<LoggingOptions>

LoggingOptions 設定的委派。

傳回

builder 的值。

例外狀況

任何自變數都是 null

備註

會移除所有其他記錄器,包括透過 AddDefaultLogger(IHttpClientBuilder)註冊的默認記錄器。 這個方法所記錄的許多資訊 (,例如主體、方法、主機、路徑和持續時間) ,都會新增為結構化記錄檔的擴充標記。 請確定您有檢視結構化記錄的方式,才能檢視這項額外資訊。

適用於