Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

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
Something went wrong with that request. Please try again.