0.0.9 • Published 5 years ago
alvarocabreradam-logit v0.0.9
Logit
Logit is a simple module to improve your application log.
Changelog
0.0.9 :
Now the module works for vanilla JavaScript.
0.0.9 :
Now the module prints objects properly.
Installation
npm install alvarocabreradam-logit
Usage
Vanilla JavaScript
const Logit = require('alvarocabreradam-logit');
const logit = new Logit('App Name');
TypeScript
import Logit from 'alvarocabreradam-logit';
const logit: Logit = new Logit('App Name');
Functions
// Enable logs
logit.active();
// Change the log header for the specified string
logit.setHeader('logit');
// Enable show date time in log
logit.enableDate();
// Enable show time in ms since the program was started
logit.enableTimer();
// Clasic white log
logit.info('Info');
// Green log
logit.success('Info');
// Red log
logit.error('Info');
// Yellow log
logit.warning('Info');
License
This project has ISC license.