/timber-logger

Purty logging in the console for node.js

Primary LanguageJavaScriptMIT LicenseMIT

Timber-Logger

Purty logging in the console.

Installation

npm install timber-logger --save

Usage

Instantiate:

  var timber = require('timber-logger');

Replace your console.log statements with the following:

  timber.log('Hello, World!');

This is how it would appear in the console:

timber log

Warnings would be:

  timber.warn('You have been warned!');

Would show up as:

timber warn

And errors:

  timber.error('This happens when warnings are disregarded!');

Would show up as:

timber error

Timber-Logger also has an experimental banner tool, some what similar to the *NIX banner command.

  var timber = require('timber-logger');

  var helloBanner = timber.makeBanner('HELLO!');

  for (var i=0;i<8;i+=1) {
    timber.log(helloBanner[i]);
  }

You get:

*     * ******  *       *         ***      *
*     * *       *       *        *   *     *
*     * *       *       *       *     *    *
******* *****   *       *       *     *    *
*     * *       *       *       *     *    *
*     * *       *       *        *   *
*     * ******  ******  ******    ***      *

Tests

TODO

Contributing

TODO

Release History

  • 0.1.0 Initial release
  • 0.1.1 Minor fixes
  • 0.2.0 Added banner functionality