I often use it with tee to save the log output of any command.
$ ping google.com | ts '[%Y%m%d-%H:%M:%.S]' | tee /tmp/ping.log [20220416-21:57:20.837983] PING google.com (172.217.175.78): 56 data bytes [20220416-21:57:20.838391] 64 bytes from 172.217.175.78: icmp_seq=0 ttl=53 time=6.028 ms [20220416-21:57:21.817189] 64 bytes from 172.217.175.78: icmp_seq=1 ttl=53 time=9.621 ms [20220416-21:57:22.818339] 64 bytes from 172.217.175.78: icmp_seq=2 ttl=53 time=9.443 ms [20220416-21:57:23.823126] 64 bytes from 172.217.175.78: icmp_seq=3 ttl=53 time=8.921 ms
I often use it with tee to save the log output of any command.