FakeLoggerBuilderExtensions.AddFakeLogging 方法

定义

重载

AddFakeLogging(ILoggingBuilder)

使用默认选项配置虚假日志记录。

AddFakeLogging(ILoggingBuilder, IConfigurationSection)

配置虚假日志记录。

AddFakeLogging(ILoggingBuilder, Action<FakeLogCollectorOptions>)

配置虚假日志记录。

AddFakeLogging(ILoggingBuilder)

Source:
FakeLoggerBuilderExtensions.cs
Source:
FakeLoggerBuilderExtensions.cs

使用默认选项配置虚假日志记录。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFakeLogging(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFakeLogging (this Microsoft.Extensions.Logging.ILoggingBuilder builder);
static member AddFakeLogging : Microsoft.Extensions.Logging.ILoggingBuilder -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddFakeLogging (builder As ILoggingBuilder) As ILoggingBuilder

参数

builder
ILoggingBuilder

日志记录生成器。

返回

日志记录 builder

适用于

AddFakeLogging(ILoggingBuilder, IConfigurationSection)

Source:
FakeLoggerBuilderExtensions.cs
Source:
FakeLoggerBuilderExtensions.cs

配置虚假日志记录。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFakeLogging(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Microsoft::Extensions::Configuration::IConfigurationSection ^ section);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFakeLogging (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddFakeLogging : Microsoft.Extensions.Logging.ILoggingBuilder * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddFakeLogging (builder As ILoggingBuilder, section As IConfigurationSection) As ILoggingBuilder

参数

builder
ILoggingBuilder

日志记录生成器。

section
IConfigurationSection

包含 FakeLogCollectorOptions的配置节。

返回

日志记录 builder

适用于

AddFakeLogging(ILoggingBuilder, Action<FakeLogCollectorOptions>)

Source:
FakeLoggerBuilderExtensions.cs
Source:
FakeLoggerBuilderExtensions.cs

配置虚假日志记录。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFakeLogging(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Action<Microsoft::Extensions::Logging::Testing::FakeLogCollectorOptions ^> ^ configure);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFakeLogging (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Action<Microsoft.Extensions.Logging.Testing.FakeLogCollectorOptions> configure);
static member AddFakeLogging : Microsoft.Extensions.Logging.ILoggingBuilder * Action<Microsoft.Extensions.Logging.Testing.FakeLogCollectorOptions> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddFakeLogging (builder As ILoggingBuilder, configure As Action(Of FakeLogCollectorOptions)) As ILoggingBuilder

参数

builder
ILoggingBuilder

日志记录生成器。

configure
Action<FakeLogCollectorOptions>

日志记录配置选项。

返回

日志记录 builder

适用于