eksctl-io / eksctl

The official CLI for Amazon EKS
https://eksctl.io
Other
4.94k stars 1.41k forks source link

Timestamps in log lines #3034

Closed Callisto13 closed 3 years ago

Callisto13 commented 3 years ago

It would be useful for every log line to be prefixed by a timestamp (not epoch, if you please).

This is pretty common in things-which-emit-logs, especially slow-things-which-emit-logs. It is especially useful for commands which may take a while.

So basically this:

./eksctl upgrade cluster --name jk --approve
[ℹ]  eksctl version 0.36.0
[ℹ]  using region us-west-2
[ℹ]  will upgrade cluster "jk" control plane from current version "1.17" to "1.18"
[ℹ]  waiting for requested "VersionUpdate" in cluster "jk" to succeed
[ℹ]  waiting for requested "VersionUpdate" in cluster "jk" to succeed
[ℹ]  waiting for requested "VersionUpdate" in cluster "jk" to succeed

Would look something like this (formatting just an illustration):

./eksctl upgrade cluster --name jk --approve
[ℹ]  2020-12-09 12:37:01 | eksctl version 0.36.0
[ℹ]  2020-12-09 12:37:01 | using region us-west-2
[ℹ]  2020-12-09 12:37:01 | will upgrade cluster "jk" control plane from current version "1.17" to "1.18"
[ℹ]  2020-12-09 12:37:21 | waiting for requested "VersionUpdate" in cluster "jk" to succeed
[ℹ]  2020-12-09 12:37:41 | waiting for requested "VersionUpdate" in cluster "jk" to succeed
[ℹ]  2020-12-09 12:38:01 | waiting for requested "VersionUpdate" in cluster "jk" to succeed

🤯 wow such info

michaelbeaumont commented 3 years ago

Potentially depending on: https://github.com/weaveworks/eksctl/issues/2237

iainelder commented 3 years ago

It would help the interactive use case.

Anecdotally,

If you forgot to use time for the command and you're not using a fancy terminal prompt that does it for you then you have no easy way to prove that.

For the resources created by CloudFormation you can look at the CloudFormation event logs after the fact.

For the Fargate profiles I don't know where to get that info.

iainelder commented 3 years ago

@aclevername thanks!

Can we expect to see this in the next release?

aclevername commented 3 years ago

@aclevername thanks!

Can we expect to see this in the next release?

Yes! Should be out in the next release (currently planned for Friday)