mirror of
https://github.com/astaxie/beego.git
synced 2025-06-12 08:00:40 +00:00
no need to call Sprintf when no args
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user