1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-02 11:33:27 +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" "os"
"path" "path"
"runtime" "runtime"
"strconv"
"sync" "sync"
) )
@ -189,7 +190,7 @@ func (bl *BeeLogger) writeMsg(logLevel int, msg string) error {
line = 0 line = 0
} }
_, filename := path.Split(file) _, filename := path.Split(file)
msg = fmt.Sprintf("[%s:%d] %s", filename, line, msg) msg = "[" + filename + ":" + strconv.FormatInt(int64(line), 10) + "]" + msg
} else { } else {
msg = msg msg = msg
} }