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

Propagate log levels from k8s dependencies #1148

Open
der-eismann opened this issue Mar 25, 2025 · 2 comments
Open

Propagate log levels from k8s dependencies #1148

der-eismann opened this issue Mar 25, 2025 · 2 comments
Assignees

Comments

@der-eismann
Copy link
Contributor

Describe the bug
When looking at the logs I can see that all messages directly from NTH have a level like INF or WRN. However if the message is coming from a k8s dependency (I think), the log level is given with ??? or omitted for JSON logging. It would be great if we could have a log level for these messages as well.

Steps to reproduce

  1. Run NTH and drain a node

Expected outcome
There should be no ??? for log levels anymore

Application Logs

2025/03/25 08:07:27 INF Draining the node
2025/03/25 08:07:27 ??? WARNING: ignoring DaemonSet-managed Pods: default/abc-wlm7t, default/def-rl86f, default/ghi-bb65s, …
2025/03/25 08:07:27 ??? evicting pod default/my-pod-79dc9db6d5-g9rln

Environment

  • NTH App Version: v1.25.0
  • NTH Mode (IMDS/Queue processor): Queue
  • OS/Arch: Container / Bottlerocket arm64
  • Kubernetes version: 1.32
  • Installation method: Helm
@der-eismann
Copy link
Contributor Author

Solution may be the same as for #1150 with the SetLogger function in klog

@der-eismann
Copy link
Contributor Author

Turns out that this doesn't help as this comes from kubectl and that's using plain fmt and not klog 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants