Skip to content

ConsoleOutput Class

Definition

namespace Sharplog.Outputs

public class ConsoleOutput : Output
Object
Output
   ConsoleOutput

Output using the default console output.

Constructors

Name
ConsoleOutput()
ConsoleOutput(bool, string, LevelContainer, Dictionary<LogLevel, Color>)

Properties

Name Type GET SET
Format string
Levels LevelContainer
ColorEnabled bool
Colors Dictionary<LogLevel, Color>

Inherited Methods

Name Modifiers Returns
Write(string, Log) public

Constructors

ConsoleOutput()

public ConsoleOutput()
    : this(true, null, null, null)

Initializes a new instance of the ConsoleOutput class.

ConsoleOutput(bool, string, LevelContainer, Dictionary<LogLevel, Color>)

public ConsoleOutput(
    bool colorEnabled = true,
    string format = null,
    LevelContainer levels = null,
    Dictionary<LogLevel, Color> colors = null)

Initializes a new instance of the ConsoleOutput class.

Parameter

colorEnabled bool · true
If set to true color output is enabled.
format string · null
The format.
levels LevelContainer · null
The level settings.
colors Dictionary<LogLevel, Color>
The colors.

Properties

ColorEnabled

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

Gets or sets a value indicating whether color is enabled.

Colors

public LevelContainer Levels { get; set; }
Type: Dictionary<LogLevel, Color>

Gets or sets the colors for each log level.