The logger class, its instances will be the euber loggers.

Hierarchy

  • Logger

Constructors

  • The constructor of the Logger class.

    Parameters

    • Optional options: string | {
          debug?: boolean;
          palette?: { primary?: { info?: string | undefined; success?: string | undefined; debug?: string | undefined; warning?: string | undefined; error?: string | undefined; } | undefined; secondary?: { ...; } | undefined; };
          scope?: null | string;
      }

      The options of the logger. If you want to change only the scope you can pass it as a string.

    Returns Logger

Methods

  • Logs one or more empty lines.

    Parameters

    • n: number = 1

      The number of empty lines. Default is 1.

    Returns void

  • Logs a debug message. The format is "[DEBUG] |{SCOPE}| message |object|", where |word| is optional. If specified in the options, nothing will be logged.

    Parameters

    • message: string

      The message to be logged.

    • Optional object: any

      An optional object to log.

    Returns void

  • Logs an error message. The format is "[ERROR] |{SCOPE}| message |object|", where |word| is optional.

    Parameters

    • message: string

      The message to be logged.

    • Optional error: any

    Returns void

  • Logs one or more hr lines.

    Parameters

    • n: number = 1

      The number of hr lines to print. Default is 1.

    • color: string = 'white'

      The colour of the font. Default is 'white'.

    • symbol: string = '-'

      The symbol that constitutes the hr. Default is '-'.

    Returns void

  • Logs an info message. The format is "[INFO] |{SCOPE}| message |object|", where |word| is optional.

    Parameters

    • message: string

      The message to be logged.

    • Optional object: any

      An optional object to log.

    Returns void

  • Sets the options of the logger.

    Parameters

    • Optional options: string | {
          debug?: boolean;
          palette?: { primary?: { info?: string | undefined; success?: string | undefined; debug?: string | undefined; warning?: string | undefined; error?: string | undefined; } | undefined; secondary?: { ...; } | undefined; };
          scope?: null | string;
      }

      The options for the logger.

    Returns void

  • Logs a success message. The format is "[SUCCESS] |{SCOPE}| message |object|", where |word| is optional.

    Parameters

    • message: string

      The message to be logged.

    • Optional object: any

      An optional object to log.

    Returns void

  • Logs a warning message. The format is "[WARNING] |{SCOPE}| message |object|", where |word| is optional.

    Parameters

    • message: string

      The message to be logged.

    • Optional object: any

      An optional object to log.

    Returns void

Generated using TypeDoc