Skip to content

Commit

Permalink
test: fix logger issue
Browse files Browse the repository at this point in the history
Fix Error/Warning:

```
[controller-runtime] log.SetLogger(...) was never called;
logs will not be displayed.
```

Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
  • Loading branch information
iamniting committed Nov 14, 2024
1 parent e891579 commit 8279760
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/deploymanager/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"k8s.io/client-go/tools/clientcmd"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

var (
Expand Down Expand Up @@ -53,6 +54,8 @@ func NewDeployManager() (*DeployManager, error) {
return nil, err
}

log.SetLogger(zap.New(zap.UseDevMode(true)))

return &DeployManager{
Client: client,
Log: log.Log.WithName("DeployManager"),
Expand Down

0 comments on commit 8279760

Please sign in to comment.