ConsoleLoggerExtensions.AddConsoleFormatter Metod

Definition

Överlagringar

Name Description
AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder)

Lägger till en anpassad konsolloggerare "TFormatter" som ska konfigureras med alternativen "TOptions".

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

Lägger till en anpassad konsolloggerare "TFormatter" som ska konfigureras med alternativen "TOptions".

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder)

Källa:
ConsoleLoggerExtensions.cs
Källa:
ConsoleLoggerExtensions.cs
Källa:
ConsoleLoggerExtensions.cs
Källa:
ConsoleLoggerExtensions.cs

Lägger till en anpassad konsolloggerare "TFormatter" som ska konfigureras med alternativen "TOptions".

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);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding TOptions to configuration values may require generating dynamic code at runtime.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("TOptions's dependent types may have their members trimmed. Ensure all required members are preserved.")]
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;
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;
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding TOptions to configuration values may require generating dynamic code at runtime.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("TOptions's dependent types may have their members trimmed. Ensure all required members are preserved.")>]
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)
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

Typparametrar

TFormatter

Formateraren för anpassad konsolloggning.

TOptions

Konfigurationsalternativen.

Parametrar

builder
ILoggingBuilder

Att ILoggingBuilder använda.

Returer

Den aktuella loggningsverktygets instans så att ytterligare anrop kan länkas.

Attribut

Gäller för

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

Källa:
ConsoleLoggerExtensions.cs
Källa:
ConsoleLoggerExtensions.cs
Källa:
ConsoleLoggerExtensions.cs
Källa:
ConsoleLoggerExtensions.cs

Lägger till en anpassad konsolloggerare "TFormatter" som ska konfigureras med alternativen "TOptions".

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);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding TOptions to configuration values may require generating dynamic code at runtime.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("TOptions's dependent types may have their members trimmed. Ensure all required members are preserved.")]
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;
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;
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding TOptions to configuration values may require generating dynamic code at runtime.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("TOptions's dependent types may have their members trimmed. Ensure all required members are preserved.")>]
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)
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

Typparametrar

TFormatter

Formateraren för anpassad konsolloggning.

TOptions

Konfigurationsalternativen.

Parametrar

builder
ILoggingBuilder

Att ILoggingBuilder använda.

configure
Action<TOptions>

Ett ombud för att konfigurera alternativen "TOptions" för den anpassade formateren "TFormatter".

Returer

Den aktuella loggningsverktygets instans så att ytterligare anrop kan länkas.

Attribut

Gäller för