A basic logger which handles filtering by level.

With the default options it will write to console.error and it will use the formatting provided by console.error. If the destination is overwritten, then it will use an included formatter similar to util.format.

If a formatter is available, then that should be overridden as well for performance.

Hierarchy

  • BasicLogger

Implements

Constructors

Properties

_destinations?: any
_formatter?: any
_log: any
_logLevel: any
_name: any
_tryFormat: any
_tryWrite: any

Methods

  • The debug logger.

    Parameters

    • Rest ...args: any[]

      A sequence of any JavaScript values.

      Rest

    Returns void

  • The error logger.

    Parameters

    • Rest ...args: any[]

      A sequence of any JavaScript values.

      Rest

    Returns void

  • The info logger.

    Parameters

    • Rest ...args: any[]

      A sequence of any JavaScript values.

      Rest

    Returns void

  • The warning logger.

    Parameters

    • Rest ...args: any[]

      A sequence of any JavaScript values.

      Rest

    Returns void

  • This should only be used as a default fallback and not as a convenient solution. In most cases you should construct a new instance with the appropriate options for your specific needs.

    Returns BasicLogger

Generated using TypeDoc