FakeLoggerBuilderExtensions.AddFakeLogging 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddFakeLogging(ILoggingBuilder) |
使用默认选项配置虚假日志记录。 |
AddFakeLogging(ILoggingBuilder, IConfigurationSection) |
配置虚假日志记录。 |
AddFakeLogging(ILoggingBuilder, Action<FakeLogCollectorOptions>) |
配置虚假日志记录。 |
AddFakeLogging(ILoggingBuilder)
使用默认选项配置虚假日志记录。
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)
配置虚假日志记录。
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>)
配置虚假日志记录。
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
。