node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »


winstoon Build Status

Very Simple Wrapper Over winston logger

which provides few functionalities which winston does not offer

  • simple logger creation for multiple contexts
  • add transports to all created loggers
  • set root log level for all created loggers


npm install winstoon


var winstoon = require('winstoon');
var logger = winstoon.createLogger('logger-name');'this is a info message', { tag: 'tag-value'})

Add transports

This needs to done at once on your source and applies to all


Other transports available

winstoon inherits all the transports available at winston

set root log level

It's very important to switch from the different log levels at different stage of the application. You can choose your root log level as follows

winstoon.setRootLevel('debug'); //only show logs levels higher than info

Shorthand logger creation

var logger = require('winstoon')('logger-name');

Common Tags instead of the logger name

It is possible to configure a set of common tags for a logger, which always get logged.

var logger = require('winstoon')({context: 'name', host: 'host123'});

log level priorities can be found here

  • fatal
  • error
  • warn
  • info
  • debug
  • log