module-log

Logger for Individual Node.js Module(s)

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
module-log
1.0.16 years ago6 years agoMinified + gzip package size for module-log in KB

Readme

module-log
Logger for Individual Node.js Module(s)
Travis Codecov Commitizen friendly npm
The idea is that you can set up the name of the module and use pre-defined logging functionalities for each individual module. In terminal window, the output of log statements is going to be according to file (or module) name(s).
Enhancement over normal ol' console.log().

Installation

$ npm install module-log --save

Usage

const log = require('module-log');

log.setFileName('server.js');
log.log('testing');
log.error('An error occurred!!!');

API

  • setFileName
To set File name of the module to show in console on every log output.
  • log
  • debug
  • error
  • warn
  • info

---