Share via


WebHostBuilderExtensions.ConfigureLogging Method

Definition

Overloads

ConfigureLogging(IWebHostBuilder, Action<WebHostBuilderContext,ILoggingBuilder>)

Adds a delegate for configuring the provided LoggerFactory. This may be called multiple times.

ConfigureLogging(IWebHostBuilder, Action<ILoggingBuilder>)

Adds a delegate for configuring the provided ILoggingBuilder. This may be called multiple times.

ConfigureLogging(IWebHostBuilder, Action<WebHostBuilderContext,ILoggingBuilder>)

Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs

Adds a delegate for configuring the provided LoggerFactory. This may be called multiple times.

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

Parameters

hostBuilder
IWebHostBuilder

The IWebHostBuilder to configure.

configureLogging
Action<WebHostBuilderContext,ILoggingBuilder>

The delegate that configures the LoggerFactory.

Returns

The IWebHostBuilder.

Applies to

ConfigureLogging(IWebHostBuilder, Action<ILoggingBuilder>)

Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs

Adds a delegate for configuring the provided ILoggingBuilder. This may be called multiple times.

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

Parameters

hostBuilder
IWebHostBuilder

The IWebHostBuilder to configure.

configureLogging
Action<ILoggingBuilder>

The delegate that configures the ILoggingBuilder.

Returns

The IWebHostBuilder.

Applies to