ConsoleLoggerExtensions.AddSimpleConsole 方法

定义

重载

AddSimpleConsole(ILoggingBuilder)

使用默认属性将名为“simple”的默认控制台日志格式化程序添加到工厂。

AddSimpleConsole(ILoggingBuilder, Action<SimpleConsoleFormatterOptions>)

将名为“simple”的控制台日志格式化程序添加到配置了指定 simple 控制台格式化程序选项的工厂。

AddSimpleConsole(ILoggingBuilder)

Source:
ConsoleLoggerExtensions.cs
Source:
ConsoleLoggerExtensions.cs
Source:
ConsoleLoggerExtensions.cs

使用默认属性将名为“simple”的默认控制台日志格式化程序添加到工厂。

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

参数

builder
ILoggingBuilder

要使用的最新日志记录生成器实例。

返回

最新日志记录生成器实例,以便可以链接其他调用。

适用于

AddSimpleConsole(ILoggingBuilder, Action<SimpleConsoleFormatterOptions>)

Source:
ConsoleLoggerExtensions.cs
Source:
ConsoleLoggerExtensions.cs
Source:
ConsoleLoggerExtensions.cs

将名为“simple”的控制台日志格式化程序添加到配置了指定 simple 控制台格式化程序选项的工厂。

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

参数

builder
ILoggingBuilder

要使用的最新日志记录生成器实例。

configure
Action<SimpleConsoleFormatterOptions>

用于为内置默认日志格式化程序配置控制台记录器选项的委托。

返回

最新日志记录生成器实例,以便可以链接其他调用。

适用于