0.2.4 • Published 10 years ago

consolation v0.2.4

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

consolation

NPM version

This module adds some sprinkles to node's vanilla console.

##How it looks image

##Getting started ###Installation

npm install consolation

Basic usage

var consolation = require ('consolation');

var console = new consolation ();

console.ok ('This console.log is OK');
console.info ('This console.log is an INFO');
console.err ('This console.log is an ERROR');
console.warn ('This console.log is a WARNING');

###Options You can pass options when creating the object:

var console = new consolation ({
  title: 'My cool title', use_time: false, use_symbols: false, log_level: 'warn'
});

Available options:

  • title [String]: the title of your logger, usually (but not necessarily) the name of the file (default is nothing),
  • use_time [Boolean]: whether to display the time on each log line (default true),
  • use_symbols [Boolean]: whether to display a nice unicode symbol at the end of each log line (default is true),
  • log_level [String]: the minimum level from which logs are displayed (can take values from ['info', 'ok', 'warn', 'err'], and default is 'info'),
  • monochrome [Boolean]: output black and white log lines. This is useful when you need to output log lines to a file (default is false).

##Tests Testing is done using mocha and should.js so you might wanna get your hands on those as well:

make install && npm install mocha -g

and then:

make test

Misc.

PR, comments and suggestions are welcome !

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago