0.0.3 • Published 8 years ago

fjandin-log v0.0.3

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

Log

Log method

Install

npm install fjandin-log

Usage

const log = require('fjandin-log');
log.setSettings({
    addFileLineNum: true, // Try and guess file and line number of log
    level: 'debug', // severity log level
    addDate: true, // Prepend logs with [ISO_8601_DATE]
    addSeverity: true // Prepend logs with [severity]
});

log.debug('test');
log.info('test');
log.warn('test');
log.error('test');
log.time('test');
log.timeEnd('test');

Output

[2016-06-17T22:36:39.678Z] [debug] [/test.js:12] test
[2016-06-17T22:36:39.690Z] [info] [/test.js:13] test
[2016-06-17T22:36:39.691Z] [warn] [/test.js:14] test
[2016-06-17T22:36:39.691Z] [error] [/test.js:15] test
[2016-06-17T22:36:39.691Z] [timer] [/test.js:17] test: 0ms
0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago