Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

okt-logger

Hapi Server based Logger Utility that collects helpful information about requests made to the server.

logger, hapi, oktagon

readme

Okt Logger

Description

Logger Utility that collects helpful information about requests made to the server.

It is based on hapi server

Config

Configure the Logger "oktLogger": {
// if true, all the requests are logged "debug": true,

    // interval for get monitored accounts from redis
    "refreshTime": 60000        
}

References

Hapi Documentation: https://hapijs.com/api#request-logs

Get started

Register the plugin on register-plugins.js

const oktLogger = require('okt-logger'); const redisClient = require('gas-redis').getPrimaryClient();

let plugins = [ . . . {
register : oktLogger, options : { config, logger, redisClient } } ];

Configuration:

Add this to the config/<enviroment>.json . . . "oktLogger": {
"debug": true,
"refreshTime": 60000
} . . .

Parameters: // if true, all the requests are logged "debug": true,

// interval for get monitored accounts from redis "refreshTime": 60000

Installation

npm install okt-logger --save

Recomendation

replace -> reply(Boom.badImplementation(err.name)); by -> reply(new Error(err));