共用方式為


ConsoleLoggerExtensions.AddConsole 方法

定義

多載

AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>)

將名為 'Console' 的主控台記錄器新增至 Factory。

AddConsole(ILoggingBuilder)

將名為 'Console' 的主控台記錄器新增至 Factory。

AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>)

來源:
ConsoleLoggerExtensions.cs
來源:
ConsoleLoggerExtensions.cs
來源:
ConsoleLoggerExtensions.cs
來源:
ConsoleLoggerExtensions.cs
來源:
ConsoleLoggerExtensions.cs

將名為 '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)

來源:
ConsoleLoggerExtensions.cs
來源:
ConsoleLoggerExtensions.cs
來源:
ConsoleLoggerExtensions.cs
來源:
ConsoleLoggerExtensions.cs
來源:
ConsoleLoggerExtensions.cs

將名為 '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

傳回

適用於