1.0.9 • Published 9 years ago

catlog v1.0.9

Weekly downloads
17
License
MIT
Repository
github
Last release
9 years ago

catlog

Build Status Coverage Status

NPM

Modern log utility for node apps

  • debug utility like visionmedia/debug
  • full feature logging utilites
  • extensible logging frameworks
    • plugins like formatters and log handlers
    • event-driven logging activity
    • context-based configuration

Documentation

See more at http://robinqu.github.io/catlog.

TL;DR

Simple debug

Just like the popular visionmedia/debug.

const debug = require('catlog')('app:main');

debug('I am here');
debug('Hi, babe!');

But the log goes to other handlers (fs_handler as default) as well. So your debug info will have chances to be recorded by fs_handler in files, instead of being deserted if no DEBUG env is set.

Log, in levels

Behave like old-fashined log utilites.

const logger = require('catlog')();

logger.info('good news');
logger.warn('important notice');
logger.error('bad news');
logger.debug('verbose news');
//also have alias, as `log`
logger.log('bad news');

Configuration

All settings are shared in the same process. And configure it on logging context, using:

const logger = require('catlog')({
  methods: {
    foobar: {
      target: 'stdout',
      level: 70
    }
  },
  category: 'special_app'
});

License

MIT

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.0

11 years ago

0.0.6

13 years ago

0.0.5

13 years ago

0.0.4

13 years ago

0.0.2

13 years ago

0.0.1

13 years ago