HttpLoggingServicesExtensions.AddHttpLogging 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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>)
新增 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的委派。
傳回
鏈結的原始服務集合。