Table of Contents

Class CustomStdoutFormatter

Namespace
Tlabs.Config
Assembly
Tlabs.Core.dll

Custom stdout formatter.

public sealed class CustomStdoutFormatter : ConsoleFormatter
Inheritance
CustomStdoutFormatter
Inherited Members
Extension Methods

Remarks

This custom formatter generates log entries with this format:

{timestamp} [{level}] {category}: {message?} {exception?}{newline}

Constructors

CustomStdoutFormatter(IOptions<CustomStdoutFormatterOptions>)

Ctor from opt.

public CustomStdoutFormatter(IOptions<CustomStdoutFormatterOptions> opt)

Parameters

opt IOptions<CustomStdoutFormatterOptions>

Fields

NAME

Custom stdout formatter name.

public const string NAME = "stdoutFormat"

Field Value

string

Methods

Write<TState>(in LogEntry<TState>, IExternalScopeProvider?, TextWriter)

public override void Write<TState>(in LogEntry<TState> logEntry, IExternalScopeProvider? scopeProvider, TextWriter textWriter)

Parameters

logEntry LogEntry<TState>
scopeProvider IExternalScopeProvider
textWriter TextWriter

Type Parameters

TState