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/27 19:27:08 UTC

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

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


##########
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:
   Am sure that this works and is better but could you just explain how. Not least might be good to stick a comment about it to give anyonelse an idea seeing as we both got confused originally.



-- 
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