0.4.4 • Published 11 years ago

basic-logger v0.4.4

Weekly downloads
149
License
-
Repository
-
Last release
11 years ago

logger

Basic logger for nodejs supporting error, warning, debug and info messages with timestamp. Everything you log is printed to the console.

Installation

npm install logger

Usage

var logger = require('logger');

var customConfig = {
	showMillis: true;
	stringifyJSON: false;
};

var log = new logger(customConfig)

log.info('New Info!');
log.error('An error occurred');
log.warn('I am not kidding!');
log.debug('this code is still alive...');

Config options

  • showMillis - Show the milliseconds in the timestamp
  • stringifyJSON - Apply JSON.stringify to the given message. Good to log objects or arrays.

Test

You'll need vows. Then just run npm test.

Future versions

I am willing to add support for colored log messages and allow to define a prefix which is prepended to all messages.

0.4.4

11 years ago

0.4.3

12 years ago

0.4.2

12 years ago

0.4.1

12 years ago

0.4.0

12 years ago

0.3.3

12 years ago

0.3.2

12 years ago

0.3.1

12 years ago

0.3.0

12 years ago

0.2.1

12 years ago

0.2.0

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago