ConsoleLoggerExtensions.AddConsole 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>) |
將名為 'Console' 的主控台記錄器新增至 Factory。 |
AddConsole(ILoggingBuilder) |
將名為 'Console' 的主控台記錄器新增至 Factory。 |
AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>)
將名為 'Console' 的主控台記錄器新增至 Factory。
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)
將名為 'Console' 的主控台記錄器新增至 Factory。
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。