steplix-logger
v0.0.1
Published
Steplix Logger is a Node.js logger helper.
Downloads
1
Readme
Steplix Logger
Steplix Logger is a Node.js logger helper.
Index
Download & Install
NPM
npm install steplix-logger
Source code
$ git clone https://gitlab.com/steplix/SteplixLogger.git
$ cd SteplixLogger
$ npm install
How is it used?
Logger
const logger = require('steplix-logger');
logger.error(new Error('Not Found')); // [2020-01-28T17:16:50.379Z] - ERROR - ✘ Ooops... Error: Not Found
logger.error('This is an error'); // [2020-01-28T17:16:50.379Z] - ERROR - ✘ Ooops... This is an error
logger.warn('This is a warning'); // [2020-01-28T17:16:50.381Z] - WARN - ⚠ This is a warning
logger.info('Hello World!'); // [2020-01-28T17:16:50.381Z] - INFO - Hello World!
logger.title('Hello World!'); // [2020-01-28T17:16:50.382Z] - INFO - ========== Hello World! ==========
logger.success('Hello World!'); // [2020-01-28T17:16:50.383Z] - INFO - ✔ Hello World!
logger.arrow('Hello World!'); // [2020-01-28T17:16:50.384Z] - INFO - • Hello World!
logger.step('Hello World!'); // [2020-01-28T17:16:50.384Z] - INFO - ✦ Hello World!
logger.lap('Hello World!'); // [2020-01-28T17:16:50.384Z] - INFO - ➜ Hello World!
Tests
In order to see more concrete examples, I INVITE YOU TO LOOK AT THE TESTS :)
Run the unit tests
npm test