Skip to content

Commit

Permalink
error fix for oeprator.go
Browse files Browse the repository at this point in the history
Signed-off-by: Shoaeb Jindani <[email protected]>
  • Loading branch information
Shoaeb Jindani committed Apr 5, 2024
1 parent 6983d24 commit ea3538b
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 ea3538b

Please sign in to comment.