Skip to main content

Logger

A console-compatible logger interface used by the Adaline client and Monitor for internal diagnostic output.

Import

Definition


Methods

Any object that implements these four methods is a valid Logger. This includes the built-in console object as well as popular logging libraries like Winston, Pino, and Bunyan.

Usage

Using debug: true

The simplest way to enable logging is the debug shortcut, which uses console as the logger:

Passing console directly

Equivalent to debug: true:

Custom logger

Provide any object that satisfies the Logger interface:

With a logging library

Works with any library that exposes the standard log-level methods:

See Also

  • Adaline — accepts logger and debug in its constructor options