0.0.2 • Published 9 years ago

tablog v0.0.2

Weekly downloads
10
License
-
Repository
github
Last release
9 years ago

A More Simple Logger

I created this because every time I wanted to use log4js I was unsatisfied with the defaults it offers, so I ended up copy-pasting the same lines of code every time to get it into the format I wanted. This logger is simple. It only logs to stdout, you can't customize the colors or format... If it doesn't offer functionality you want, go use log4js.

Using

var log = require('tablog')
log.trace('this will be in grey')
log.info('and this in green')
log.setLevel(log.lerror)
log.warn('this would be in yellow but it wont print because we set the level to only print at error and above')
log.error('this will print and be in red')
log.fatal('this will be in purple and will also process.exit(1) the program')