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

Set controller-runtime logger to a null logger #3932

Merged
merged 1 commit into from
May 30, 2023

Conversation

aryan9600
Copy link
Member

@aryan9600 aryan9600 commented May 30, 2023

This is required because controller-runtime expects its consumers to set a logger through log.SetLogger within 30 seconds of the program's initalization. If not set, the entire debug stack is printed as an error. Ref: https://github.com/kubernetes-sigs/controller-runtime/blob/ed8be90/pkg/log/log.go#L59 Since we have our own logging and don't care about controller-runtime's logger, we configure it's logger to do nothing.

Fixes: #3931

cmd/flux/main.go Outdated Show resolved Hide resolved
This is required because controller-runtime expects its consumers to
set a logger through log.SetLogger within 30 seconds of the program's
initalization. If not set, the entire debug stack is printed as an
error. Ref: https://github.com/kubernetes-sigs/controller-runtime/blob/ed8be90/pkg/log/log.go#L59
Since we have our own logging and don't care about controller-runtime's
logger, we configure it's logger to do nothing.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
@hiddeco hiddeco added the bug Something isn't working label May 30, 2023
@aryan9600 aryan9600 merged commit 390ff1b into fluxcd:main May 30, 2023
@aryan9600 aryan9600 mentioned this pull request Jun 1, 2023
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to rc4 with flux bootstrap outputs log.SetLogger(...) was never called
2 participants