WebHostBuilderExtensions.ConfigureLogging 方法

定义

重载

ConfigureLogging(IWebHostBuilder, Action<WebHostBuilderContext,ILoggingBuilder>)

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

ConfigureLogging(IWebHostBuilder, Action<ILoggingBuilder>)

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

ConfigureLogging(IWebHostBuilder, Action<WebHostBuilderContext,ILoggingBuilder>)

Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
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>)

Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
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

适用于