HttpClientLoggingHttpClientBuilderExtensions.AddExtendedHttpClientLogging 方法

定义

重载

AddExtendedHttpClientLogging(IHttpClientBuilder)

添加 , IHttpClientAsyncLogger 以便为名为 HttpClient的 发出传出请求的日志。

AddExtendedHttpClientLogging(IHttpClientBuilder, IConfigurationSection)

添加 , IHttpClientAsyncLogger 以便为名为 HttpClient的 发出传出请求的日志。

AddExtendedHttpClientLogging(IHttpClientBuilder, Action<LoggingOptions>)

添加 , IHttpClientAsyncLogger 以便为名为 HttpClient的 发出传出请求的日志。

AddExtendedHttpClientLogging(IHttpClientBuilder)

Source:
HttpClientLoggingHttpClientBuilderExtensions.cs
Source:
HttpClientLoggingHttpClientBuilderExtensions.cs
Source:
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)

Source:
HttpClientLoggingHttpClientBuilderExtensions.cs
Source:
HttpClientLoggingHttpClientBuilderExtensions.cs
Source:
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>)

Source:
HttpClientLoggingHttpClientBuilderExtensions.cs
Source:
HttpClientLoggingHttpClientBuilderExtensions.cs
Source:
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)注册的默认记录器。 此方法记录的大量信息 (如正文、方法、主机、路径和持续时间) 将作为扩充标记添加到结构化日志。 确保有查看结构化日志的方法,以便查看此额外信息。

适用于