ConsoleLoggerExtensions.AddConsoleFormatter Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder) |
Adds a custom console logger formatter. |
AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder, Action<TOptions>) |
Adds a custom console logger formatter to be configured with the specified options. |
AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder)
- Source:
- ConsoleLoggerExtensions.cs
- Source:
- ConsoleLoggerExtensions.cs
- Source:
- ConsoleLoggerExtensions.cs
- Source:
- ConsoleLoggerExtensions.cs
Adds a custom console logger formatter.
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
Type Parameters
- TFormatter
The custom console logger formatter.
- TOptions
The configuration options.
Parameters
- builder
- ILoggingBuilder
The current logging builder instance to use.
Returns
The current logging builder instance so that additional calls can be chained.
Applies to
AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder, Action<TOptions>)
- Source:
- ConsoleLoggerExtensions.cs
- Source:
- ConsoleLoggerExtensions.cs
- Source:
- ConsoleLoggerExtensions.cs
- Source:
- ConsoleLoggerExtensions.cs
Adds a custom console logger formatter to be configured with the specified options.
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
Type Parameters
- TFormatter
The custom console logger formatter.
- TOptions
The configuration options.
Parameters
- builder
- ILoggingBuilder
The current logging builder instance to use.
- configure
- Action<TOptions>
A delegate to configure TOptions
for the custom formatter TFormatter
.
Returns
The current logging builder instance so that additional calls can be chained.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기