Add support for epoch timestamps
Hi,
It seems fblog cannot detect and convert epoch timestamps (in seconds / microseconds etc.) to a human-readable format automatically, which could be a very helpful feature to have.
Example:
{"time":"1705105985", ...}
At the moment fblog does not interpret the timestamp. I just outputs the field.
With the new config file support we could do something. But we would have to define the input and output format :thinking:
for json logs, you can simply pipe to jq for performing any data transformations. For example to parse timestamps from kubectl output:
kubectl logs myPod | jq -c '.timestamp |= (. / 1000 | strftime("%Y-%m-%d %H:%M:%S"))' | fblog -c
Already 4 upvotes. I did not expect this. I'll try to implement something soon.
4.10.0