1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 22:01:29 +00:00

fast format

This commit is contained in:
JessonChan 2016-01-12 22:54:39 +08:00
parent 69804afc1b
commit c535dc386e

View File

@ -38,6 +38,7 @@ import (
"os"
"path"
"runtime"
"strconv"
"sync"
)
@ -189,7 +190,7 @@ func (bl *BeeLogger) writeMsg(logLevel int, msg string) error {
line = 0
}
_, filename := path.Split(file)
msg = fmt.Sprintf("[%s:%d] %s", filename, line, msg)
msg = "[" + filename + ":" + strconv.FormatInt(int64(line), 10) + "]" + msg
} else {
msg = msg
}