共用方式為


HostingHostBuilderExtensions.ConfigureLogging 方法

定義

多載

ConfigureLogging(IHostBuilder, Action<HostBuilderContext,ILoggingBuilder>)

新增用於設定所提供 ILoggingBuilder 的委派。 可能會多次呼叫此項。

ConfigureLogging(IHostBuilder, Action<ILoggingBuilder>)

新增用於設定所提供 ILoggingBuilder 的委派。 可能會多次呼叫此項。

ConfigureLogging(IHostBuilder, Action<HostBuilderContext,ILoggingBuilder>)

來源:
HostingHostBuilderExtensions.cs
來源:
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>)

來源:
HostingHostBuilderExtensions.cs
來源:
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 執行個體。

適用於