Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "core/logging"

Index

Enumerations

Variables

Functions

Variables

Let verbosity

verbosity: Level = Level.INFO

The global verbosity level for Magenta.js.

Functions

log

  • log(msg: string, prefix?: string, level?: Level): void
  • Logs a message at the given verbosity level.

    If level is below the global verbosity level, the message is ignored.

    Parameters

    • msg: string

      The message to log.

    • Default value prefix: string = "Magenta.js"

      The prefix of the message, should specify the model or library that is doing the logging.

    • Default value level: Level = Level.INFO

      The verbosity level of the message. The message will not be logged if this level is greater than the verbosity setting.

    Returns void

logWithDuration

  • logWithDuration(msg: string, startTime: number, prefix?: string, level?: Level): void
  • Logs a message at the given verbosity level, with the duration.

    If level is below the global verbosity level, the message is ignored.

    Parameters

    • msg: string

      The message to log.

    • startTime: number

      The start time to use for duration calculation, in ms.

    • Default value prefix: string = "Magenta.js"

      The prefix of the message, should specify the model or library that is doing the logging.

    • Default value level: Level = Level.INFO

      The verbosity level of the message. The message will not be logged if this level is greater than the verbosity setting.

    Returns void

setVerbosity

  • setVerbosity(verbosity: Level): void
  • Sets verbosity level.

    If level is below the global verbosity level, the message is ignored.

    Parameters

    • verbosity: Level

      The new verbosity

    Returns void

Generated using TypeDoc