HttpClientLoggingServiceCollectionExtensions 類別

定義

用來註冊擴充 HTTP 用戶端記錄功能的擴充功能。

public ref class HttpClientLoggingServiceCollectionExtensions abstract sealed
public static class HttpClientLoggingServiceCollectionExtensions
type HttpClientLoggingServiceCollectionExtensions = class
Public Module HttpClientLoggingServiceCollectionExtensions
繼承
HttpClientLoggingServiceCollectionExtensions

方法

AddExtendedHttpClientLogging(IServiceCollection)

針對使用 IHttpClientFactory建立的所有 HTTP 用戶端,新增 以IHttpClientAsyncLogger發出傳出要求的記錄。

AddExtendedHttpClientLogging(IServiceCollection, Action<LoggingOptions>)

針對使用 IHttpClientFactory建立的所有 HTTP 用戶端,新增 以IHttpClientAsyncLogger發出傳出要求的記錄。

AddExtendedHttpClientLogging(IServiceCollection, IConfigurationSection)

針對使用 IHttpClientFactory建立的所有 HTTP 用戶端,新增 以IHttpClientAsyncLogger發出傳出要求的記錄。

AddHttpClientLogEnricher<T>(IServiceCollection)

將的 T 擴充器實例加入至 IServiceCollection 以擴充 HttpClient 記錄。

適用於