winston-wrapper

This utility combine user attributes with known attributes and fill in defaults when needed.

npm install winston-wrapper
1 downloads in the last day
8 downloads in the last week
28 downloads in the last month

Just Log

Build Status

Install

npm i --save winston-wrapper

Using

Code:

var log = require('../main.js')(module);

log.info('infos');
log.error('error');
log.debug('debug');

Result in console:

$ NODE_ENV=development node index.js

info: [test/index.js] Init
info: [test/index.js] infos
error: [test/index.js] error
debug: [test/index.js] debug

$ NODE_ENV=production node index.js

error: [test/index.js] error
npm loves you