ConsoleLoggerExtensions.AddJsonConsole Method

Definition

Overloads

AddJsonConsole(ILoggingBuilder)

Add a console log formatter named 'json' to the factory with default properties.

AddJsonConsole(ILoggingBuilder, Action<JsonConsoleFormatterOptions>)

Add and configure a console log formatter named 'json' to the factory.

AddJsonConsole(ILoggingBuilder)

Source:
ConsoleLoggerExtensions.cs
Source:
ConsoleLoggerExtensions.cs

Add a console log formatter named 'json' to the factory with default properties.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddJsonConsole(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddJsonConsole (this Microsoft.Extensions.Logging.ILoggingBuilder builder);
static member AddJsonConsole : Microsoft.Extensions.Logging.ILoggingBuilder -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddJsonConsole (builder As ILoggingBuilder) As ILoggingBuilder

Parameters

builder
ILoggingBuilder

The ILoggingBuilder to use.

Returns

The current logging builder instance so that additional calls can be chained.

Applies to

AddJsonConsole(ILoggingBuilder, Action<JsonConsoleFormatterOptions>)

Source:
ConsoleLoggerExtensions.cs
Source:
ConsoleLoggerExtensions.cs

Add and configure a console log formatter named 'json' to the factory.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddJsonConsole(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Action<Microsoft::Extensions::Logging::Console::JsonConsoleFormatterOptions ^> ^ configure);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddJsonConsole (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Action<Microsoft.Extensions.Logging.Console.JsonConsoleFormatterOptions> configure);
static member AddJsonConsole : Microsoft.Extensions.Logging.ILoggingBuilder * Action<Microsoft.Extensions.Logging.Console.JsonConsoleFormatterOptions> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddJsonConsole (builder As ILoggingBuilder, configure As Action(Of JsonConsoleFormatterOptions)) As ILoggingBuilder

Parameters

builder
ILoggingBuilder

The ILoggingBuilder to use.

configure
Action<JsonConsoleFormatterOptions>

A delegate to configure the Microsoft.Extensions.Logging.Console.ConsoleLogger options for the built-in json log formatter.

Returns

The current logging builder instance so that additional calls can be chained.

Applies to