No description, website, or topics provided.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.jshintrc
README.md
browser.js
index.js
package.json

README.md

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