Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use logger.SetLogger to also configure klog #809

Merged
merged 1 commit into from
Mar 8, 2023
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Mar 7, 2023

This uses the newly introduced helper from runtime, which also configures the logger for klog.

Resulting in all logs now being properly formatted, even when logged by internal Kubernetes elements like the leader election or a dynamic client.

The update from fluxcd/pkg/runtime from v0.29.0 to v0.31.0 in addition includes a change which configures the event recoder to only log on level trace (as opposed to debug).

@hiddeco hiddeco added the enhancement New feature or request label Mar 7, 2023
@hiddeco hiddeco force-pushed the runtime-logger-klog branch 2 times, most recently from 4f3989c to c1a8306 Compare March 7, 2023 17:48
This uses the newly introduced helper from runtime, which also
configures the logger for `klog`.

Resulting in all logs now being properly formatted, even when logged by
internal Kubernetes elements like the leader election or a dynamic
client.

The update from `fluxcd/pkg/runtime` from `v0.29.0` to `v0.31.0` in
addition includes a change which configures the event recoder to only
log on level `trace` (as opposed to `debug`).

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco hiddeco merged commit f548468 into main Mar 8, 2023
@hiddeco hiddeco deleted the runtime-logger-klog branch March 8, 2023 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants