colorful-log
Simple, lightweight and good looking logger.
Installation
npm i colorful-log
Usage
All the options are optional, you can even just use new Logger()
without passing any opts.
; const log = debug: false // default is set to true path: './logs' // which is default system: 'test' cluster: 0 saveInterval: 60000 // 60 secs log;log;log;log; // won't print out since debug is set to false, but still save to log files throw 'fatal'; // uncaughtException & unhandledRejection will be catched and logged, then exit (as it should be)
Manual Save
log.save()
method returns a Promise, it's the same method that was called when saveInterval reached.
async await log;