ConsoleLoggerExtensions.AddConsole 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>) |
将名为“Console”的控制台记录器添加到工厂。 |
AddConsole(ILoggingBuilder) |
将名为“Console”的控制台记录器添加到工厂。 |
AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>)
- Source:
- ConsoleLoggerExtensions.cs
- Source:
- ConsoleLoggerExtensions.cs
- Source:
- ConsoleLoggerExtensions.cs
将名为“Console”的控制台记录器添加到工厂。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddConsole(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Action<Microsoft::Extensions::Logging::Console::ConsoleLoggerOptions ^> ^ configure);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsole (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Action<Microsoft.Extensions.Logging.Console.ConsoleLoggerOptions> configure);
static member AddConsole : Microsoft.Extensions.Logging.ILoggingBuilder * Action<Microsoft.Extensions.Logging.Console.ConsoleLoggerOptions> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddConsole (builder As ILoggingBuilder, configure As Action(Of ConsoleLoggerOptions)) As ILoggingBuilder
参数
- builder
- ILoggingBuilder
要使用的 ILoggingBuilder。
- configure
- Action<ConsoleLoggerOptions>
用于配置 Microsoft.Extensions.Logging.Console.ConsoleLogger 的委托。
返回
适用于
AddConsole(ILoggingBuilder)
- Source:
- ConsoleLoggerExtensions.cs
- Source:
- ConsoleLoggerExtensions.cs
- Source:
- ConsoleLoggerExtensions.cs
将名为“Console”的控制台记录器添加到工厂。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddConsole(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsole (this Microsoft.Extensions.Logging.ILoggingBuilder builder);
static member AddConsole : Microsoft.Extensions.Logging.ILoggingBuilder -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddConsole (builder As ILoggingBuilder) As ILoggingBuilder
参数
- builder
- ILoggingBuilder
要使用的 ILoggingBuilder。