Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.49 KB

README.md

File metadata and controls

49 lines (36 loc) · 1.49 KB

common-nodeutils NPM version Build Status Dependency Status Coverage percentage

Commonly used node functionality

Installation

$ npm install --save common-nodeutils

Usage

  • LOGGER
var commonNodeutils = require('common-nodeutils');
var filename = 'logs/tests.log';
logger = commonNodeutils.logger('test', filename);
logger.info('testing 123');
logger.warn('testing 123');
logger.error('testing 123');
logger.fatal('testing 123');
logger.setLevel('DEBUG');
logger.debug('testing 123');
[2016-03-15 19:11:59.726] INFO test testing 123
[2016-03-15 19:11:59.729] WARN test testing 123
[2016-03-15 19:11:59.729] ERROR test testing 123
[2016-03-15 19:11:59.729] FATAL test testing 123
[2016-03-15 19:11:59.729] DEBUG test testing 123

License

MIT © Fritz G. Batroni