1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 18:20:55 +00:00

Merge pull request #4299 from AllenX2018/fix-4282

fix issue 4282
This commit is contained in:
Ming Deng 2020-11-10 21:57:52 +08:00 committed by GitHub
commit aa2c0ca108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))
}