evillogger
Yet another nodejs logger
Last updated 22 days ago by eviltik .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install evillogger 
SYNC missed versions from official npm registry.

evillogger

MIT Licence

nodejs logger for daemons. evilcluster compatible.

Installation

$ npm install evillogger

Usage

const log = require('evillogger')('myProcessName');
// or
//const log = require('evillogger')();
// or
//const log = require('evillogger')(options)
// spaces: number of spaces around namespace, default 30
// repl: add \r before any output, default false
// colorize: color or not color, default true
// file: output to file


log.info('info !',{foo:'bar'});
log.warn('warn !!');
log.error(new Error('huhu'));

// will be shown only if DEBUG env var not empty
// or if you pass --debug as argument
log.debug('debug ...');

Output (stdout)

$ node example\example1.js
11:50:45.952  0 | myProcessName        | info:  info ! { foo: 'bar' }
11:50:45.952  0 | myProcessName        | warn:  warn !!
11:50:45.952  0 | myProcessName        | error: Error: huhu
    at Object.<anonymous> (D:\git\evillogger\example\example1.js:5:11)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

Current Tags

  • 1.4.0                                ...           latest (22 days ago)

25 Versions

  • 1.4.0                                ...           22 days ago
  • 1.3.9                                ...           a year ago
  • 1.3.8                                ...           a year ago
  • 1.3.7                                ...           a year ago
  • 1.3.6                                ...           2 years ago
  • 1.3.5                                ...           2 years ago
  • 1.3.4                                ...           2 years ago
  • 1.3.3                                ...           2 years ago
  • 1.3.2                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.2                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.9.1                                ...           3 years ago
  • 0.9.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 16
Last Day 0
Last Week 0
Last Month 5
Dependencies (5)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |