Logging

plasma-utils.logging exposes a few logging helpers. These helpers make it possible to log messages in different contexts, e.g. in development or production.

API

ConsoleLogger

Creates a new ConsoleLogger, which simply wraps console.log.

Parameters

N/A

Returns

ConsoleLogger: The ConsoleLogger instance.


= Methods =

Logs a new message to the console.

Parameters

  1. message - String: The message to be logged.

DebugLogger

Creates a new DebugLogger, which wraps the debug NPM library. The DebugLogger generally has better formatting than the ConsoleLogger.

Parameters

N/A

Returns

DebugLogger: The DebugLogger instance.


= Methods =

Logs a new message to the console, with extra formatting.

Parameters

  1. message - String: The message to be logged.