Class Logger

Logger class for printing logs with different colors and symbols.

Constructors

  • Creates a new instance of the Logger class.

    Parameters

    • options: loggerOptions

      The options for configuring the logger.

    Returns Logger

Properties

_defaultOptions: {
    symbols: {
        error: "✖";
        ready: "⭕️";
        success: "✔";
        warn: "❗";
    };
}

Type declaration

  • symbols: {
        error: "✖";
        ready: "⭕️";
        success: "✔";
        warn: "❗";
    }
    • error: "✖"
    • ready: "⭕️"
    • success: "✔"
    • warn: "❗"
_useCustomLabel?: {
    error?: string;
    ready?: string;
    success?: string;
    warn?: string;
}

Type declaration

  • Optional error?: string
  • Optional ready?: string
  • Optional success?: string
  • Optional warn?: string
_useDefault?: boolean

Methods

  • Prints out an "error" log to the console.

    Parameters

    • content: any

      The content to print.

    • Optional confirmRedify: boolean

      Whether to apply red color to the content.

    Returns void

  • Prints out a "ready" log to the console.

    Parameters

    • content: any

      The content to print.

    • Optional confirmBlueify: boolean

      Whether to apply blue color to the content.

    Returns void

  • Resolves the chalk color based on the LoggerColors enum.

    Parameters

    • color: LoggerColors

      The color to resolve.

    • content: any

      The content to apply the color to.

    Returns string

    The content with the resolved color.

  • Prints out a "success" log to the console.

    Parameters

    • content: any

      The content to print.

    • Optional confirmGreenify: boolean

      Whether to apply green color to the content.

    Returns void

  • Prints out a "warn" log to the console.

    Parameters

    • content: any

      The content to print.

    • Optional confirmYellowify: boolean

      Whether to apply yellow color to the content.

    Returns void

Generated using TypeDoc