A logger that pretty-prints everything.

Hierarchy (View Summary)

Constructors

Properties

COLOR_BLUE: string = '\u001B[34m'
COLOR_CYAN: string = '\u001B[36m'
COLOR_GRAY: string = '\u001B[90m'
COLOR_GREEN: string = '\u001B[32m'
COLOR_MAGENTA: string = '\u001B[35m'
COLOR_RED: string = '\u001B[31m'
COLOR_RESET: string = '\u001B[0m'
COLOR_YELLOW: string = '\u001B[33m'
LEVELS: Record<string, number> = ...

All available logging levels.

Methods

  • Parameters

    • level: string
    • color: string
    • message: string
    • Optionaldata: any

    Returns void

  • Convert a string-based logging level to a numerical logging level.

    Parameters

    • level: string

      A string-based logging level

    Returns number

    The numerical logging level, or undefined.

  • Return a string in a given color

    Parameters

    • str: any

      The string that should be printed in

    • color: string

      A given color

    Returns string