1.0.10 • Published 4 years ago

okt-logger v1.0.10

Weekly downloads
6
License
ISC
Repository
-
Last release
4 years ago

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/.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));