A simple logger. Supports info, and warn without any configuration

Leverages util.debuglog to enable debug logging To use debug logging:

export NODE_DEBUG=module-name,other-module

Constructors

Properties

Methods

Constructors

  • Initialize a logger

    Parameters

    • modname: string

      Should always be the value module.id

    Returns Logger

Properties

logger: ((msg, ...param) => void)

Type declaration

    • (msg, ...param): void
    • Parameters

      • msg: string
      • Rest ...param: string[]

      Returns void

modname: string

Should always be the value module.id

Methods

  • Parameters

    • message: string
    • Rest ...args: string[]

    Returns void

  • Parameters

    • level: string
    • message: string
    • showName: boolean
    • args: string[]

    Returns string

  • Parameters

    • message: string
    • Rest ...args: string[]

    Returns void

  • Parameters

    • message: string
    • Rest ...args: string[]

    Returns void