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的委托。
返回
用于链接的原始服务集合。