mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 00:40:54 +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 {
|
} else {
|
||||||
msg = levelPrefix[logLevel] + msg
|
msg = levelPrefix[logLevel] + msg
|
||||||
}
|
}
|
||||||
msg = fmt.Sprintf(msg, v...)
|
if len(v) > 0 {
|
||||||
|
msg = fmt.Sprintf(msg, v...)
|
||||||
|
}
|
||||||
when := time.Now()
|
when := time.Now()
|
||||||
if bl.enableFuncCallDepth {
|
if bl.enableFuncCallDepth {
|
||||||
_, file, line, ok := runtime.Caller(bl.loggerFuncCallDepth)
|
_, file, line, ok := runtime.Caller(bl.loggerFuncCallDepth)
|
||||||
|
Loading…
Reference in New Issue
Block a user