Logging Client
pa-logging-client is a micro dependency to facilitate logging inside the Pacifica system. It acts as a thin wrapper for winston configuring it to behave as needed and returning an instance of a winston logger to the consumer. In local development the logger only writes to the console. When set to an environment other than local and provided a valid log entries API token, this logging client will log everything to log entries. Additional information about winston and it's capabilities can be found here.
Installation
Run this command in a terminal session to add pa-logging-client to your project:
npm install --save git+ssh://git@github.com:Mindflash/pa-logging-client.git
API
The logger module should be invoked when the hapi server is initialized with these arguments:
token
: An api token for a log entries application logger.
// index.js or bootstrap.jsconst logger = ; logger; // some/other/file.jsconst logger = ;logger;