Pretty formatter with relative time stamp, inspired by moreutils ts but with less noise, print only changes :)
Save file
chmod +x ts.js
For example for express
app that use debug and frontail and with colors:
DEBUG_COLORS=yes DEBUG="*,-follow-redirects" npm run serve:ssr 2>&1| ./ts.js | frontail --port 8888 -
Or just in console:
21:55 $ DEBUG_COLORS=yes DEBUG="*,-follow-redirects" npm run serve:ssr 2>&1 | ./ts.js
[21:02 2.246 +293]
[ .255 +0] > node dist/server
[ ]
[21:02 3.133 +878] express:router:route new '/all' +0ms
[ .134 +1] express:router:layer new '/all' +5ms
[ .135 +1] express:router:route get '/all' +2ms
[ .136 +1] express:router:layer new '/' +0ms
[ .136 +0] express:router:route new '/cache' +1ms
[ ] express:router:layer new '/cache' +0ms
[ ] express:router:route get '/cache' +0ms
[ .138 +2] express:router:layer new '/' +0ms
[ .138 +0] express:router:route new '/clear-api-cache' +0ms
[ ] express:router:layer new '/clear-api-cache' +0ms
[ .141 +3] express:router:route post '/clear-api-cache' +0ms
[ .141 +0] express:router:layer new '/' +0ms
[ ] express:router:route new '/precache' +0ms
[ ] express:router:layer new '/precache' +1ms
[ ] express:router:route post '/precache' +0ms
[ ] express:router:layer new '/' +0ms
[ .142 +1] express:router use '/api' router +0ms
[ .142 +0] express:router:layer new '/api' +0ms