Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Severity

Level of importance. Used for log levels and diagnostic classifications.

Hierarchy

  • Severity

Implements

Index

Properties

Static ALERT_LEVEL

ALERT_LEVEL: number = 6

Static DEBUG_LEVEL

DEBUG_LEVEL: number = 1

Static ERROR_LEVEL

ERROR_LEVEL: number = 5

Static FATAL_LEVEL

FATAL_LEVEL: number = 7

Static INFO_LEVEL

INFO_LEVEL: number = 2

Static NOTE_LEVEL

NOTE_LEVEL: number = 3

Static TRACE_LEVEL

TRACE_LEVEL: number = 0

Static WARNING_LEVEL

WARNING_LEVEL: number = 4

Methods

compareTo

equals

  • equals(that: unknown): boolean

hashCode

  • hashCode(): number

isAlert

  • isAlert(): boolean

isDebug

  • isDebug(): boolean

isError

  • isError(): boolean

isFatal

  • isFatal(): boolean

isInfo

  • isInfo(): boolean

isNote

  • isNote(): boolean

isTrace

  • isTrace(): boolean

isWarning

  • isWarning(): boolean

label

  • label(): string
  • label(label: string): Severity

level

  • level(): number
  • Returns the integer level of importance of this Severity, with higher levels signifying greater importance.

    Returns number

    an integer between 0 and 7, inclusive. One of TRACE_LEVEL, DEBUG_LEVEL, INFO_LEVEL, NOTE_LEVEL, WARNING_LEVEL, ERROR_LEVEL, ALERT_LEVEL, FATAL_LEVEL.

toString

  • toString(): string

Static alert

Static create

  • create(level: number, label?: undefined | string): Severity
  • Returns a Severity with the given importance level, and optional descriptive label.

    throws

    Error if level is not a valid level of importance.

    Parameters

    • level: number
    • Optional label: undefined | string

    Returns Severity

Static debug

Static error

Static fatal

Static info

Static note

Static trace

Static warning