HostingHostBuilderExtensions.ConfigureLogging 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ConfigureLogging(IHostBuilder, Action<HostBuilderContext,ILoggingBuilder>) |
添加一个委托来配置提供的 ILoggingBuilder。 这可多次进行调用。 |
ConfigureLogging(IHostBuilder, Action<ILoggingBuilder>) |
添加一个委托来配置提供的 ILoggingBuilder。 这可多次进行调用。 |
ConfigureLogging(IHostBuilder, Action<HostBuilderContext,ILoggingBuilder>)
添加一个委托来配置提供的 ILoggingBuilder。 这可多次进行调用。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureLogging(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Hosting::HostBuilderContext ^, Microsoft::Extensions::Logging::ILoggingBuilder ^> ^ configureLogging);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureLogging (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.HostBuilderContext,Microsoft.Extensions.Logging.ILoggingBuilder> configureLogging);
static member ConfigureLogging : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.Logging.ILoggingBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureLogging (hostBuilder As IHostBuilder, configureLogging As Action(Of HostBuilderContext, ILoggingBuilder)) As IHostBuilder
参数
- hostBuilder
- IHostBuilder
要配置的 IHostBuilder。
- configureLogging
- Action<HostBuilderContext,ILoggingBuilder>
用于配置 ILoggingBuilder 的委托。
返回
用于链接的相同 IHostBuilder 实例。
适用于
ConfigureLogging(IHostBuilder, Action<ILoggingBuilder>)
添加一个委托来配置提供的 ILoggingBuilder。 这可多次进行调用。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureLogging(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Logging::ILoggingBuilder ^> ^ configureLogging);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureLogging (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Logging.ILoggingBuilder> configureLogging);
static member ConfigureLogging : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Logging.ILoggingBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureLogging (hostBuilder As IHostBuilder, configureLogging As Action(Of ILoggingBuilder)) As IHostBuilder
参数
- hostBuilder
- IHostBuilder
要配置的 IHostBuilder。
- configureLogging
- Action<ILoggingBuilder>
用于配置 ILoggingBuilder 的委托。
返回
用于链接的相同 IHostBuilder 实例。