|
|
|
|
|
by atomicstack
903 days ago
|
|
I use `ts` quite often in adhoc logging/monitoring contexts. Because it uses strftime() under the hood, it has automatic support for '%F' and '%T', which are much easier to type than '%Y-%m-%d' and '%H:%M:%S'. Plus, it also has support for high-resolution times via '%.T', '%.s', and '%.S': echo 'hello world' | ts '[%F %.T]'
[2023-12-30 16:25:40.463640] hello world
|
|