I'm trying to figure out how to show a timestamp for each line of STDOUT of an Argo Workflows pod. The init
and wait
containers by default show a timestamp, but never the main
container.
The Argo CLI has a --timestamp
flag when viewing logs.
Also the argo-java-client has a logOptionsTimestamps
property that also enables timestamps.
However I cannot find a similar option when defining a Workflow in YAML. I've gone through the field reference guide but haven't been able to find something to enable timestamps in the main
container.
Does anyone know if this is possible, or how to enable them?
Thanks, Weldon
The reason init
and wait
log statements have timestamps is that the Argo executable's logger writes timestamps by default.
The --timestamps
option does not cause the containers themselves to log timestamps. It just decorates each log line with a timestamp (kubectl
has a similar option).
As far as I know, there's no way to declaratively cause code running in the main
container to log timestamps. You'd have to modify the code itself to use a logger which inserts timestamps.