From f74b70c6f6ae39bd3fc033b37846611fb827c5f0 Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik Date: Tue, 24 May 2022 19:57:40 +0200 Subject: [PATCH] use more readable timestamps in KEDA operator logs Signed-off-by: Zbynek Roubalik --- BUILD.md | 15 +++++++++++++++ CHANGELOG.md | 2 +- config/manager/manager.yaml | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index 5191939def6..f5f291c182e 100644 --- a/BUILD.md +++ b/BUILD.md @@ -178,6 +178,21 @@ Allowed values are `json` and `console` Default value: `console` +To change the logging time encoding, find `--zap-time-encoding=` argument in Operator Deployment section in `config/manager/manager.yaml` file, + modify its value and redeploy. + +Allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano` + +Default value: `rfc3339` + +> Note: Example of some of the logging time encoding values and the output: +``` +epoch - 1.6533943565181081e+09 +iso8601 - 2022-05-24T12:10:19.411Z +rfc3339 - 2022-05-24T12:07:40Z +rfc3339nano - 2022-05-24T12:10:19.411Z +``` + ### Metrics Server logging Find `--v=0` argument in Operator Deployment section in `config/metrics-server/deployment.yaml` file, modify its value and redeploy. diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e61dbfeedd..7d48d9fe0b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ To learn more about our roadmap, we recommend reading [this document](ROADMAP.md ### Improvements -- TODO ([#XXX](https://github.com/kedacore/keda/issue/XXX)) +- **General:** Use more readable timestamps in KEDA Operator logs ([#3066](https://github.com/kedacore/keda/issue/3066)) ### Deprecations diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index b48479293df..f302c668c49 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -34,6 +34,7 @@ spec: - --leader-elect - --zap-log-level=info - --zap-encoder=console + - --zap-time-encoding=rfc3339 imagePullPolicy: Always resources: requests: