mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 22:30:49 +00:00
no need to call Sprintf when no args
This commit is contained in:
parent
06299fa47b
commit
f02ff0420d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user