1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 14:50:54 +00:00

fix issue 4282

This commit is contained in:
AllenX2018 2020-11-10 15:45:34 +08:00
parent fb12e1f743
commit b3474b20b9

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