Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Level

Defines a set of standard logging levels that can be used to control logging output. The logging Level objects are ordered and are specified by ordered integers. Enabling logging at a given level also enables logging at all higher levels.

Hierarchy

  • Level

Index

Properties

Static ALL

ALL: Level = new Level('ALL', 7)

Level indicating that ALL messages will be output.

readonly

Static DEBUG

DEBUG: Level = new Level('DEBUG', 5)

Level indicating only debug messages or worse will be output.

readonly

Static ERROR

ERROR: Level = new Level('ERROR', 2)

Level indicating only error messages or worse will be output.

readonly

Static FATAL

FATAL: Level = new Level('FATAL', 1)

Level indicating only fatal messages will be output.

readonly

Static INFO

INFO: Level = new Level('INFO', 4)

Level indicating only info messages or worse will be output.

readonly

Static LEVELS

LEVELS: Level[] = [Level.FATAL, Level.ERROR, Level.WARN, Level.INFO, Level.DEBUG, Level.TRACE]

An array containing all Levels.

readonly

Static OFF

OFF: Level = new Level('OFF', 0)

Level inidicating all logging is disabled.

readonly

Static TRACE

TRACE: Level = new Level('TRACE', 6)

Level indicating trace messages or worse will be output.

readonly

Static WARN

WARN: Level = new Level('WARN', 3)

Level indicating only warning messages or worse will be output.

readonly

Accessors

name

  • get name(): string

priority

  • get priority(): number
  • The numeric priority of this Level. Higher values indicate a higher level of detail.

    readonly

    Returns number

Methods

isGreaterOrEqual

  • isGreaterOrEqual(level: Level): boolean
  • Returns true if this Level is greater or equal to the priority of the supplied level.

    Parameters

    • level: Level

      The level to be compared.

    Returns boolean

Static toLevel

  • toLevel(level: string | number): Level
  • Returns a Level object representing the string or number speicified.

    Parameters

    • level: string | number

      A value corresponding to a Level.

    Returns Level

Generated using TypeDoc