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

SetLogger was never called #105

Open
malins opened this issue Jun 19, 2024 · 1 comment
Open

SetLogger was never called #105

malins opened this issue Jun 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@malins
Copy link

malins commented Jun 19, 2024

Hello,

my provider based on this template outputs the following warning:

[controller-runtime] log.SetLogger(...) was never called, logs will not be displayed:
goroutine 29 [running]:
runtime/debug.Stack()
        runtime/debug/stack.go:24 +0x65
sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot()
        sigs.k8s.io/controller-runtime@v0.15.1/pkg/log/log.go:59 +0xbd
sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithValues(0xc000525980, {0xc00059e440, 0x2, 0x2})
        sigs.k8s.io/controller-runtime@v0.15.1/pkg/log/deleg.go:168 +0x54
github.com/go-logr/logr.Logger.WithValues(...)
        github.com/go-logr/logr@v1.2.4/logr.go:323
sigs.k8s.io/controller-runtime/pkg/builder.(*Builder).doController.func1(0xc00059e420)
        sigs.k8s.io/controller-runtime@v0.15.1/pkg/builder/controller.go:398 +0x16b
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc000595220, {0x1e1cb10, 0xc00051f770}, {0x19bfee0?, 0xc00059e400?})
        sigs.k8s.io/controller-runtime@v0.15.1/pkg/internal/controller/controller.go:305 +0x18b
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc000595220, {0x1e1cb10, 0xc00051f770})
        sigs.k8s.io/controller-runtime@v0.15.1/pkg/internal/controller/controller.go:265 +0x1d9
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
        sigs.k8s.io/controller-runtime@v0.15.1/pkg/internal/controller/controller.go:226 +0x85
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
        sigs.k8s.io/controller-runtime@v0.15.1/pkg/internal/controller/controller.go:222 +0x587

How can I avoid this? General logging seems to work fine.

@malins malins added the bug Something isn't working label Jun 19, 2024
@cychiang
Copy link
Contributor

This is because of the L64 in the main function. Enable debug feature will not see those errors.

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

No branches or pull requests

2 participants