Module: Logger

Logs messages to the console in the Logfmt style

Source:

Methods

(static) clientLog(client, message)

Log a message along with client metadata.

Parameters:
Name Type Description
client Client

The client whose metadata should be logged

message object

The message to be logged

Source:
Example

Logging a message with client metadata

Logger.clientLog(client, { hello: 'world' });

(static) error(err)

Log an error to the console in the Logfmt style.

Parameters:
Name Type Description
err Error

The error to be logged

Source:
Example

Logging an error

Logger.error(new Error('Failure'));

(static) log(message)

Log a message to the console in the Logfmt style.

Parameters:
Name Type Description
message object

The message to be logged

Source:
Example

Logging a message

Logger.log({ hello: 'world' });