Skip to content

Commit

Permalink
use more readable timestamps in KEDA operator logs (#3067)
Browse files Browse the repository at this point in the history
Signed-off-by: Zbynek Roubalik <[email protected]>
  • Loading branch information
zroubalik authored May 24, 2022
1 parent 969d8d1 commit 1eeef4f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
- --leader-elect
- --zap-log-level=info
- --zap-encoder=console
- --zap-time-encoding=rfc3339
imagePullPolicy: Always
resources:
requests:
Expand Down

0 comments on commit 1eeef4f

Please sign in to comment.