Skip to content

LevelContainer Class

Definition

namespace Sharplog.Settings

public class LevelContainer
Object
LevelContainer

Container for all log level specific settings.

Constructors

Name
LevelContainer()
LevelContainer(Level, Level, Level, Level, Level, Level)]

Properties

Name Type GET SET
Debug Level
Trace Level
Info Level
Warning Level
Error Level
Fatal Level

Methods

Name Modifiers Returns
GetLevel(LogLevel level) public Level

Constructors

LevelContainer()

public LevelContainer()
    : this(null, null, null, null, null, null)

Initializes a new instance of the LevelContainer class.

LevelContainer(Level, Level, Level, Level, Level, Level)

public LevelContainer(
    Level debug = null,
    Level trace = null,
    Level info = null,
    Level warning = null,
    Level error = null,
    Level fatal = null)

Initializes a new instance of the LevelContainer class.

Parameter

debug Level · null
The debug settings.
trace Level · null
The trace settings.
info Level · null
The info settings.
warning Level · null
The warning settings.
error Level · null
The error settings.
fatal Level · null
The fatal settings.

Properties

Debug

public Level Debug { get; set; }
Type: Level

Gets or sets the settings for the log level debug.

Trace

public Level Trace { get; set; }
Type: Level

Gets or sets the settings for the log level trace.

Info

public Level Info { get; set; }
Type: Level

Gets or sets the settings for the log level info.

Warning

public Level Warning { get; set; }
Type: Level

Gets or sets the settings for the log level warning.

Error

public Level Error { get; set; }
Type: Level

Gets or sets the settings for the log level error.

Fatal

public Level Fatal { get; set; }
Type: Level

Gets or sets the settings for the log level fatal.

Methods

GetLevel(LogLevel)

public Level GetLevel(LogLevel level)

Gets the settings for a level.

Parameter

level LogLevel ·
The level the settings should be returned from.

Returns

Type: Level
The requested settings.