diff --git a/logs/log.go b/logs/log.go index cf0f6346..3d4a4d60 100644 --- a/logs/log.go +++ b/logs/log.go @@ -256,7 +256,9 @@ func (bl *BeeLogger) writeMsg(logLevel int, msg string, v ...interface{}) error } else { msg = levelPrefix[logLevel] + msg } - msg = fmt.Sprintf(msg, v...) + if len(v) > 0 { + msg = fmt.Sprintf(msg, v...) + } when := time.Now() if bl.enableFuncCallDepth { _, file, line, ok := runtime.Caller(bl.loggerFuncCallDepth)