@@ -67,6 +67,7 @@ import (
6767 "github.com/Azure/azure-container-networking/store"
6868 "github.com/Azure/azure-container-networking/telemetry"
6969 "github.com/avast/retry-go/v4"
70+ "github.com/go-logr/zapr"
7071 "github.com/google/go-cmp/cmp"
7172 "github.com/pkg/errors"
7273 "go.uber.org/zap"
@@ -84,7 +85,6 @@ import (
8485 "sigs.k8s.io/controller-runtime/pkg/client"
8586 "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
8687 "sigs.k8s.io/controller-runtime/pkg/healthz"
87- ctrlzap "sigs.k8s.io/controller-runtime/pkg/log/zap"
8888 ctrlmgr "sigs.k8s.io/controller-runtime/pkg/manager"
8989 ctrlmetrics "sigs.k8s.io/controller-runtime/pkg/metrics/server"
9090)
@@ -629,7 +629,7 @@ func main() {
629629 }
630630
631631 // build the zap logger
632- z , c , err := loggerv2 .New (& loggerv2. Config {} )
632+ z , c , err := loggerv2 .New (& cnsconfig . Logger )
633633 defer c ()
634634 if err != nil {
635635 fmt .Printf ("failed to create logger: %v" , err )
@@ -1515,7 +1515,7 @@ func InitializeCRDState(ctx context.Context, z *zap.Logger, httpRestService cns.
15151515 Scheme : scheme ,
15161516 Metrics : ctrlmetrics.Options {BindAddress : "0" },
15171517 Cache : cacheOpts ,
1518- Logger : ctrlzap . New ( ),
1518+ Logger : zapr . NewLogger ( z ),
15191519 }
15201520
15211521 manager , err := ctrl .NewManager (kubeConfig , managerOpts )
0 commit comments