tsconsole

1.0.7 • Public • Published

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('')

Readme

Keywords

none

Package Sidebar

Install

npm i tsconsole

Weekly Downloads

1

Version

1.0.7

License

ISC

Last publish

Collaborators

  • yanggakdo