From b3474b20b9488e8580ea1dc98429d0c012c8950f Mon Sep 17 00:00:00 2001 From: AllenX2018 Date: Tue, 10 Nov 2020 15:45:34 +0800 Subject: [PATCH] fix issue 4282 --- core/logs/log.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/logs/log.go b/core/logs/log.go index d5953dfb..2c1b4dd1 100644 --- a/core/logs/log.go +++ b/core/logs/log.go @@ -764,9 +764,7 @@ func formatLog(f interface{}, v ...interface{}) string { if len(v) == 0 { return msg } - if strings.Contains(msg, "%") && !strings.Contains(msg, "%%") { - // format string - } else { + if !strings.Contains(msg, "%") { // do not contain format char msg += strings.Repeat(" %v", len(v)) }