diff --git a/cmd/rollouts-controller/main.go b/cmd/rollouts-controller/main.go index 4b058b09a7..c8deab3ea0 100644 --- a/cmd/rollouts-controller/main.go +++ b/cmd/rollouts-controller/main.go @@ -89,11 +89,13 @@ func newCommand() *cobra.Command { fmt.Println(version.GetVersion()) return nil } + logger := log.New() setLogLevel(logLevel) if logFormat != "" { log.SetFormatter(createFormatter(logFormat)) + logger.SetFormatter(createFormatter(logFormat)) } - logutil.SetKLogLogger(log.New()) + logutil.SetKLogLogger(logger) logutil.SetKLogLevel(klogLevel) log.WithField("version", version.GetVersion()).Info("Argo Rollouts starting")