Add timestamps to dokku/heroku git push output

51 views Asked by At

I am trying to "profile" from the command line how much time a dokku/heroku push deploy takes. I would like to add a relative timestamp to each line in the output of git push.

Using ts from moreutils does not work - it adds prints randomly:

git push dokku main 2>&1 | ts -s

How can I make this work?

1

There are 1 answers

0
Udi On

Apparently the server is sending ANSI escape characters that deletes the output created by ts!

sed 's/\x1b\[1G\x1b\[K//g'

Solves this issue.