1.0.1 • Published 8 years ago

module-log v1.0.1

Weekly downloads
111
License
MIT
Repository
github
Last release
8 years ago

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