HostingHostBuilderExtensions.ConfigureLogging 方法

定义

重载

ConfigureLogging(IHostBuilder, Action<HostBuilderContext,ILoggingBuilder>)

添加一个委托来配置提供的 ILoggingBuilder。 这可多次进行调用。

ConfigureLogging(IHostBuilder, Action<ILoggingBuilder>)

添加一个委托来配置提供的 ILoggingBuilder。 这可多次进行调用。

ConfigureLogging(IHostBuilder, Action<HostBuilderContext,ILoggingBuilder>)

Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs

添加一个委托来配置提供的 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>)

Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs

添加一个委托来配置提供的 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 实例。

适用于