Skip to content

Level Class

Definition

namespace Sharplog.Settings

public class Level
Object
Level

Class containing the settings for a log level.

Constructors

Name
Level()
Level(char, bool, string)]

Properties

Name Type GET SET
Enabled bool
Format string
Short char

Constructors

Level()

public Level()
    : this('-', true, null)

Initializes a new instance of the level class using default values.

Level(char, bool, string)

public Level(
    char @short = '-',
    bool enabled = true,
    string format = null)

Initializes a new instance of the Level class.

Parameter

@short char · -
The short for the log level.
enabled bool · true
Wether the level is enabled.
format string · null
The format.

Properties

Enabled

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

Gets or sets a value indicating whether this level is enabled.

Format

public string Format { get; set; }
Type: string

Gets or sets the optional format.

Short

public char Short { get; set; }
Type: char

Gets or sets a char representing the log level.