node-pretty-log
v1.1.0
Published
Pretty logs stuff to the console in Node apps.
Downloads
758
Readme
Pretty Log
Pretty logs stuff to the console in Node apps.
Usage
npm install node-pretty-log
Then, in your JavaScript:
const log = require('node-pretty-log');
log('error', 'Uh Oh...');
log('warn', 'Warning...');
log('info', 'Info...');
log('success', 'Success...');
And the results:
You can also use multiple strings or variables. Example:
const log = require('node-pretty-log');
const error = { ok: false };
const warning = { data: 'missing semicolon' };
const info = 'This is some string info';
const success = { ok: true };
log('error', 'Uh Oh...', error);
log('warn', 'Warning...', warning);
log('info', 'Info...', info);
log('success', 'Success...', success);
License
MIT