You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by "FrankYang0529 (via GitHub)" <gi...@apache.org> on 2023/05/19 09:33:22 UTC

[GitHub] [yunikorn-k8shim] FrankYang0529 commented on a diff in pull request #593: [YUNIKORN-1750] remove sprintf from logging calls

FrankYang0529 commented on code in PR #593:
URL: https://github.com/apache/yunikorn-k8shim/pull/593#discussion_r1198753965


##########
pkg/admission/conf/am_conf.go:
##########
@@ -351,8 +351,8 @@ func parseConfigRegexps(config map[string]string, key string, defaultValue strin
 	value := parseConfigString(config, key, defaultValue)
 	result, err := parseRegexes(value)
 	if err != nil {
-		log.Logger().Error(fmt.Sprintf("Unable to parse regex values '%s' for configuration '%s', using default value '%s'",
-			value, key, defaultValue), zap.Error(err))
+		log.Logger().Sugar().With(zap.Error(err)).Errorf("Unable to parse regex values '%s' for configuration '%s', using default value '%s'",

Review Comment:
   Updated it. I still keep `zap.Error(err)`. May I know why we don't use sugar? Is it cause of performance? Thank you. 



-- 
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: reviews-unsubscribe@yunikorn.apache.org

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