@kos-ng-it-konsult/logger
v0.0.4
Published
Logger package for KOS NG IT Konsult
Readme
@kos-ng-it-konsult/logger
This is a logger package for KOS NG IT Konsult.
Quick Start
Install
$ npm i --save @kos-ng-it-konsult/logger
Basic Usage
"use strict";
const logger = require('@kos-ng-it-konsult/logger');
let { redis, rabbit } = new logger([ 'redis', 'rabbit' ]);
redis.enable();
// Logs with the redis logger
redis.log(`Reading from cache with key users:all`);
// Logs with the default app logger
rabbit.log(`Publishing data to queue cre_use`);
// Now logs with the rabbit logger
rabbit.enable().log(`Publishing data to queue cre_use`);Running the Example
To run the example, simply run the command:$ node ./example/sample.js
Running Tests
Run$ npm test
