Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

plog

0.2.1 • Public • Published

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

Keywords

none

install

npm i plog

Downloadsweekly downloads

8

version

0.2.1

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability