No logger setup when called without "--debug"
davidgiga1993 opened this issue · 0 comments
davidgiga1993 commented
When running v0.10.1 without the --debug
flag I get the following error every time the provider starts:
{"level":"info","ts":"2024-02-15T06:52:30Z","logger":"provider-grafana","msg":"Beta feature enabled","flag":"EnableBetaManagementPolicies"}
[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed.
Detected at:
> goroutine 869 [running]:
> runtime/debug.Stack()
> runtime/debug/stack.go:24 +0x5e
> sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot()
> sigs.k8s.io/controller-runtime@v0.16.3/pkg/log/log.go:60 +0xcd
> sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithValues(0xc000639e00, {0xc000b27a40, 0x4, 0x4})
> sigs.k8s.io/controller-runtime@v0.16.3/pkg/log/deleg.go:168 +0x49
> github.com/go-logr/logr.Logger.WithValues(...)
> github.com/go-logr/logr@v1.3.0/logr.go:336
> sigs.k8s.io/controller-runtime/pkg/builder.(*Builder).doController.func1(0xc000e5e5a0)
> sigs.k8s.io/controller-runtime@v0.16.3/pkg/builder/controller.go:402 +0x2ba
> sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc000a36280, {0x23ac4d8, 0xc0003dfa90}, {0x1dccda0?, 0xc00085a9a0?})
> sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:306 +0x16a
> sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc000a36280, {0x23ac4d8, 0xc0003dfa90})
> sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:266 +0x1c9
> sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
> sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:227 +0x79
> created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 in goroutine 164
> sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:223 +0x565
I would expect to at least get warn/err logs but from the message it looks like none of the logs will be printed?