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

Setting -log-level debug introduces client-go logging at the INFO level #12887

Open
siggy opened this issue Jul 25, 2024 · 1 comment
Open

Setting -log-level debug introduces client-go logging at the INFO level #12887

siggy opened this issue Jul 25, 2024 · 1 comment
Labels

Comments

@siggy
Copy link
Member

siggy commented Jul 25, 2024

What is the issue?

Setting -log-level debug on the various Go Control Plane components enables more-detailed client-go logging, which is good, except those log lines are printed at the INFO level.

How can it be reproduced?

$ HOSTNAME=foo bin/go-run controller/cmd destination
INFO[2024-07-25T18:17:47Z] running version edge-24.4.5
INFO[2024-07-25T18:17:47Z] starting admin server on :9996
...
INFO[2024-07-25T18:17:50Z] caches synced

$ HOSTNAME=foo bin/go-run controller/cmd destination --log-level debug
INFO[2024-07-25T18:18:21Z] running version edge-24.4.5
INFO[2024-07-25T18:18:21Z] starting admin server on :9996
...
INFO[2024-07-25T18:18:22Z] GET [https://example.com:443/apis/discovery.k8s.io/v1](https://example.com/apis/discovery.k8s.io/v1) 200 OK in 246 milliseconds
INFO[2024-07-25T18:18:30Z] caches synced

Logs, error output, etc

see above

output of linkerd check -o short

n/a

Environment

edge-24.4.5

Possible solution

client-go logs should show up at the DEBUG level. more generally: setting -log-level debug should introduce DEBUG log lines, not more INFO lines.

Additional context

No response

Would you like to work on fixing this bug?

maybe

@siggy siggy added the bug label Jul 25, 2024
@alpeb
Copy link
Member

alpeb commented Jul 25, 2024

The issue stems from us passing logrus' standard logger to klog, which uses an InfoLevel by default. We could easily change that level to Debug, and have all client-go log entries show as debug in the output.

mikutas added a commit to mikutas/linkerd2 that referenced this issue Jul 30, 2024
mikutas added a commit to mikutas/linkerd2 that referenced this issue Jul 30, 2024
mikutas added a commit to mikutas/linkerd2 that referenced this issue Jul 31, 2024
mikutas added a commit to mikutas/linkerd2 that referenced this issue Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants