Options
All
  • Public
  • Public/Protected
  • All
Menu

The logger class.

Hierarchy

  • Logger

Index

Constructors

  • The constructor of the logger class.

    Parameters

    Returns Logger

Properties

log: boolean

If the logger is activated.

spinner: Ora

The instance of a spinner made by the ora module.

Methods

  • printDatabase(database: string): void
  • Prints a database.

    Parameters

    • database: string

      The database to print.

    Returns void

  • startDropCollection(collection: string): void
  • Starts the log for dropping a collection, by showing a spinner.

    Parameters

    • collection: string

      The collection that is going to be dropped.

    Returns void

  • startDropDatabase(database: string): void
  • Starts the log for dropping a database, by showing a spinner.

    Parameters

    • database: string

      The database that is going to be dropped.

    Returns void

  • startEmptyCollection(collection: string): void
  • Starts the log for emptying a collection, by showing a spinner.

    Parameters

    • collection: string

      The collection that is going to be emptied.

    Returns void

  • startSpinner(message: string): void
  • Helper method for starting the spinner.

    Parameters

    • message: string

      The message to log.

    Returns void

  • stopAndClear(): void
  • Stops the current spinner, deleting its last output.

    Returns void

  • stopDropCollection(succeded: boolean, fallback?: boolean): void
  • Stops the log for dropping a collection, by stopping the current spinner.

    Parameters

    • succeded: boolean

      If the operation succeded.

    • Optional fallback: boolean

      If there is a fallback in case the operation did not succed.

    Returns void

  • stopDropDatabase(succeded: boolean, fallback?: boolean): void
  • Stops the log for dropping a database, by stopping the current spinner.

    Parameters

    • succeded: boolean

      If the operation succeded.

    • Optional fallback: boolean

      If there is a fallback in case the operation did not succed.

    Returns void

  • stopEmptyCollection(succeded: boolean): void
  • Stops the log for emptying a collection, by stopping the current spinner.

    Parameters

    • succeded: boolean

      If the operation succeded.

    Returns void

  • stopSpinner(succeded: boolean, fallback?: boolean): void
  • Helper method for stopping the spinner.

    Parameters

    • succeded: boolean

      If the outcome were positive.

    • Optional fallback: boolean

      If the outcome were negative, use a fallback.

    Returns void

Generated using TypeDoc