Skip to content

Commit

Permalink
error fix for oeprator.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Shoaeb Jindani committed Apr 5, 2024
1 parent 844df57 commit 3dc9032
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/command/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ func OperatorWithSignal(operatorCfg *oconfig.Config, signalHandler context.Conte
config.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
logger, err := config.Build()
if err != nil {
fmt.Sprintf("failed to initialize logger: %v", err)
return err
}

// Wrap the zap.Logger with go-logr/zapr to satisfy the logr.Logger interface
log := zapr.NewLogger(logger)

logf.SetLogger(log)
ctrl.SetLogger(log)
} else {
Expand Down

0 comments on commit 3dc9032

Please sign in to comment.