stream-log
a tiny stream logger.
Last updated 11 years ago by yields .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install stream-log 
SYNC missed versions from official npm registry.

stream-log

a tiny stream logger.

Installation

$ npm install stream-log

Example


var Logger = require('./');
var logger = new Logger(process.stderr);
var types = ['info', 'install', 'fetch', 'fetching'];
var times = 20;

types.forEach(function(type){
  logger.type(type, '36m');
});

logger.type('error', '31;1m', function(){
  logger.end();
  process.exit(1);
});

var i = setInterval(function(){
  var type = types[Math.random() * 4 | 0];
  --times && logger[type]('user/package@1.0.0');
  times || end();
}, 10)

function end(){
  clearInterval(i);
  logger.error(new Error('boom!').stack);
}

License

(MIT)

Current Tags

  • 0.2.3                                ...           latest (11 years ago)

8 Versions

  • 0.2.3                                ...           11 years ago
  • 0.2.2                                ...           11 years ago
  • 0.2.1                                ...           11 years ago
  • 0.2.0                                ...           11 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
  • 0.0.1                                ...           12 years ago
  • 0.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |