共用方式為


HttpLoggingServicesExtensions.AddHttpLogging 方法

定義

多載

AddHttpLogging(IServiceCollection)

新增 HTTP 記錄服務。

AddHttpLogging(IServiceCollection, Action<HttpLoggingOptions>)

新增 HTTP 記錄服務。

AddHttpLogging(IServiceCollection)

新增 HTTP 記錄服務。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddHttpLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpLogging (services As IServiceCollection) As IServiceCollection

參數

services
IServiceCollection

用於新增服務的 IServiceCollection

傳回

鏈結的原始服務集合。

適用於

AddHttpLogging(IServiceCollection, Action<HttpLoggingOptions>)

來源:
HttpLoggingServicesExtensions.cs

新增 HTTP 記錄服務。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.HttpLogging.HttpLoggingOptions> configureOptions);
static member AddHttpLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.HttpLogging.HttpLoggingOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpLogging (services As IServiceCollection, configureOptions As Action(Of HttpLoggingOptions)) As IServiceCollection

參數

services
IServiceCollection

用於新增服務的 IServiceCollection

configureOptions
Action<HttpLoggingOptions>

要設定 HttpLoggingOptions的委派。

傳回

鏈結的原始服務集合。

適用於