Sdílet prostřednictvím


ConsoleLoggerExtensions.AddConsoleFormatter Metoda

Definice

Přetížení

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder)

Přidá vlastní formátovací modul protokolovacího modulu konzoly.

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

Přidá vlastní formátovací modul pro protokolovací modul konzoly, který se nakonfiguruje se zadanými možnostmi.

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder)

Zdroj:
ConsoleLoggerExtensions.cs
Zdroj:
ConsoleLoggerExtensions.cs
Zdroj:
ConsoleLoggerExtensions.cs
Zdroj:
ConsoleLoggerExtensions.cs

Přidá vlastní formátovací modul protokolovacího modulu konzoly.

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

Parametry typu

TFormatter

Vlastní formátovací modul protokolovacího nástroje konzoly.

TOptions

Možnosti konfigurace.

Parametry

builder
ILoggingBuilder

Aktuální instance tvůrce protokolování, která se má použít.

Návraty

Aktuální instance tvůrce protokolování, aby bylo možné zřetězit další volání.

Platí pro

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

Zdroj:
ConsoleLoggerExtensions.cs
Zdroj:
ConsoleLoggerExtensions.cs
Zdroj:
ConsoleLoggerExtensions.cs
Zdroj:
ConsoleLoggerExtensions.cs

Přidá vlastní formátovací modul pro protokolovací modul konzoly, který se nakonfiguruje se zadanými možnostmi.

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

Parametry typu

TFormatter

Vlastní formátovací modul protokolovacího nástroje konzoly.

TOptions

Možnosti konfigurace.

Parametry

builder
ILoggingBuilder

Aktuální instance tvůrce protokolování, která se má použít.

configure
Action<TOptions>

Delegát pro konfiguraci TOptions pro vlastní formátovací TFormatter.

Návraty

Aktuální instance tvůrce protokolování, aby bylo možné zřetězit další volání.

Platí pro