Bagikan melalui


ConsoleLoggerExtensions.AddConsoleFormatter Metode

Definisi

Overload

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder)

Menambahkan pemformat pencatat konsol kustom.

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder, Action<TOptions>)

Menambahkan formatter pencatat konsol kustom untuk dikonfigurasi dengan opsi yang ditentukan.

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder)

Sumber:
ConsoleLoggerExtensions.cs
Sumber:
ConsoleLoggerExtensions.cs
Sumber:
ConsoleLoggerExtensions.cs
Sumber:
ConsoleLoggerExtensions.cs

Menambahkan pemformat pencatat konsol kustom.

public:
generic <typename TFormatter, typename TOptions>
 where TFormatter : Microsoft::Extensions::Logging::Console::ConsoleFormatter where TOptions : Microsoft::Extensions::Logging::Console::ConsoleFormatterOptions[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddConsoleFormatter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsoleFormatter<TFormatter,TOptions> (this Microsoft.Extensions.Logging.ILoggingBuilder builder) where TFormatter : Microsoft.Extensions.Logging.Console.ConsoleFormatter where TOptions : Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions;
static member AddConsoleFormatter : Microsoft.Extensions.Logging.ILoggingBuilder -> Microsoft.Extensions.Logging.ILoggingBuilder (requires 'Formatter :> Microsoft.Extensions.Logging.Console.ConsoleFormatter and 'Options :> Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions)
<Extension()>
Public Function AddConsoleFormatter(Of TFormatter As ConsoleFormatter, TOptions As ConsoleFormatter) (builder As ILoggingBuilder) As ILoggingBuilder

Jenis parameter

TFormatter

Formatter pencatat konsol kustom.

TOptions

Opsi konfigurasi.

Parameter

builder
ILoggingBuilder

Instans penyusun pengelogan saat ini untuk digunakan.

Mengembalikan

Instans penyusun pengelogan saat ini sehingga panggilan tambahan dapat dirangkai.

Berlaku untuk

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder, Action<TOptions>)

Sumber:
ConsoleLoggerExtensions.cs
Sumber:
ConsoleLoggerExtensions.cs
Sumber:
ConsoleLoggerExtensions.cs
Sumber:
ConsoleLoggerExtensions.cs

Menambahkan formatter pencatat konsol kustom untuk dikonfigurasi dengan opsi yang ditentukan.

public:
generic <typename TFormatter, typename TOptions>
 where TFormatter : Microsoft::Extensions::Logging::Console::ConsoleFormatter where TOptions : Microsoft::Extensions::Logging::Console::ConsoleFormatterOptions[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddConsoleFormatter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Action<TOptions> ^ configure);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsoleFormatter<TFormatter,TOptions> (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Action<TOptions> configure) where TFormatter : Microsoft.Extensions.Logging.Console.ConsoleFormatter where TOptions : Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions;
static member AddConsoleFormatter : Microsoft.Extensions.Logging.ILoggingBuilder * Action<'Options (requires 'Options :> Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions)> -> Microsoft.Extensions.Logging.ILoggingBuilder (requires 'Formatter :> Microsoft.Extensions.Logging.Console.ConsoleFormatter and 'Options :> Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions)
<Extension()>
Public Function AddConsoleFormatter(Of TFormatter As ConsoleFormatter, TOptions As ConsoleFormatter) (builder As ILoggingBuilder, configure As Action(Of TOptions)) As ILoggingBuilder

Jenis parameter

TFormatter

Formatter pencatat konsol kustom.

TOptions

Opsi konfigurasi.

Parameter

builder
ILoggingBuilder

Instans penyusun pengelogan saat ini untuk digunakan.

configure
Action<TOptions>

Delegasi untuk mengonfigurasi TOptions untuk formatter kustom TFormatter.

Mengembalikan

Instans penyusun pengelogan saat ini sehingga panggilan tambahan dapat dirangkai.

Berlaku untuk