共用方式為


WebHostBuilderExtensions.ConfigureLogging 方法

定義

多載

ConfigureLogging(IWebHostBuilder, Action<WebHostBuilderContext,ILoggingBuilder>)

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

ConfigureLogging(IWebHostBuilder, Action<ILoggingBuilder>)

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

ConfigureLogging(IWebHostBuilder, Action<WebHostBuilderContext,ILoggingBuilder>)

來源:
WebHostBuilderExtensions.cs
來源:
WebHostBuilderExtensions.cs
來源:
WebHostBuilderExtensions.cs

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

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureLogging(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::Extensions::Logging::ILoggingBuilder ^> ^ configureLogging);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureLogging (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.Extensions.Logging.ILoggingBuilder> configureLogging);
static member ConfigureLogging : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.Logging.ILoggingBuilder> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureLogging (hostBuilder As IWebHostBuilder, configureLogging As Action(Of WebHostBuilderContext, ILoggingBuilder)) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 IWebHostBuilder

configureLogging
Action<WebHostBuilderContext,ILoggingBuilder>

設定 LoggerFactory 的委派。

傳回

IWebHostBuilder

適用於

ConfigureLogging(IWebHostBuilder, Action<ILoggingBuilder>)

來源:
WebHostBuilderExtensions.cs
來源:
WebHostBuilderExtensions.cs
來源:
WebHostBuilderExtensions.cs

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

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureLogging(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Logging::ILoggingBuilder ^> ^ configureLogging);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureLogging (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.Extensions.Logging.ILoggingBuilder> configureLogging);
static member ConfigureLogging : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.Extensions.Logging.ILoggingBuilder> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureLogging (hostBuilder As IWebHostBuilder, configureLogging As Action(Of ILoggingBuilder)) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 IWebHostBuilder

configureLogging
Action<ILoggingBuilder>

設定 ILoggingBuilder 的委派。

傳回

IWebHostBuilder

適用於