Skip to content

AnsiConsoleOutput Class

Definition

namespace Sharplog.Outputs

public class AnsiConsoleOutput : Output
Object
Output
   AnsiConsoleOutput

Output using Spectre.Console.AnsiConsole.

Constructors

Name
AnsiConsoleOutput()
AnsiConsoleOutput(bool, string?, LevelContainer?)

Properties

Name Type GET SET
Format string
Levels LevelContainer
AnsiErrorPrint bool

Inherited Methods

Name Modifiers Returns
Write(string, Log) public

Constructors

AnsiConsoleOutput()

public AnsiConsoleOutput()
    : this(false, null, null)

Initializes a new instance of the AnsiConsoleOutput class.

AnsiConsoleOutput(bool, string?, LevelContainer?)

public AnsiConsoleOutput(
    bool ansiErrorPrint = false,
    string? format = null,
    LevelContainer? levels = null)

Initializes a new instance of the AnsiConsoleOutput class.

Parameter

ansiErrorPrint bool · false
If set to true the build in error logging capability of Spectre.Console.AnsiConsole get used.
format string · null
The format.
levels LevelContainer · null
The level settings.

Properties

AnsiErrorPrint

public bool AnsiErrorPrint { get; set; }
Type: bool

Gets or sets a value indicating wether the build in error logging capability of Spectre.Console.AnsiConsole should be used. Do not specify an error format if you set this parameter to true, else the error will be logged twice.