1.0.7 • Published 8 years ago
tsconsole v1.0.7
var c = require('tsconsole');
c.log('Hi!');
11:05:21:459 > Hi!
c.warning('May I have your attention');
11:05:21:459 > May I have your attention (with yellow text)
c.error('Oops!');
11:05:21:459 > Oops! (with red text)
Use c.log(str.red), c.log(str.cyan) and other variables from "colors" package.
Use c.setTimeFormat('your desirable format'), default is HH:mm:ss:SSS, find more info on http://momentjs.com/
You may want to disable time output at certain situations (like when time is already appended to logs by pm2) — just use c.setTimeFormat('')