Skip to content

Commit

Permalink
fix: set formatter for klog logger (argoproj#3493)
Browse files Browse the repository at this point in the history
Signed-off-by: Chetan Banavikalmutt <[email protected]>
  • Loading branch information
chetan-rns authored Apr 2, 2024
1 parent a13d033 commit 55bac14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/rollouts-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 55bac14

Please sign in to comment.