You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/06/28 07:00:12 UTC

[GitHub] [camel-k] christophd commented on a diff in pull request #3401: fix(#3399): Improve operator log level adjustments

christophd commented on code in PR #3401:
URL: https://github.com/apache/camel-k/pull/3401#discussion_r908107887


##########
pkg/cmd/operator/operator.go:
##########
@@ -120,16 +112,12 @@ func Run(healthPort, monitoringPort int32, leaderElection bool, leaderElectionID
 		}
 	}
 
-	logLevelEnabler := loglvl{
-		Level: logLevel,
-	}
-
-	logf.SetLogger(zap.New(func(o *zap.Options) {
+	logf.SetLogger(zapctrl.New(func(o *zapctrl.Options) {
 		o.Development = false
-		o.Level = logLevelEnabler
+		o.Level = zap.NewAtomicLevelAt(logLevel)

Review Comment:
   I saw that zap is doing it this way when adding the default level options so I thought it must be the right way to do it 😄



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org