plog

Some helpers around winston for managing logs across an entire app / set of libraries easy like in python.

npm install plog
18 downloads in the last week
35 downloads in the last month

node-plog

Friendly logging for Javascript.

Usage

var plog = require('plog'),
    debug = plog('example');

debug('just like good old debug');
debug('args', ['get', 'expanded']);
debug.error('but you can also have levels');

// You can grab any loggers that have been created
// and change their levels
plog.all().level('debug');

// Or by regex
plog.find(/^example/).level('critical');

// Which comes in handy for tests
plog.all().level('debug').remove('console').file('./plog-example.log');

// And in production
plog.all().level('error').file('./plog.log');

// You can even use the normal env variables
process.env.DEBUG=* === plog.all().level('debug');

It also works in the browser thanks to browserify.

If you're working in chrome, you'll also get colored output in the console.

Color in your console

Install

 npm install plog
npm loves you