fast format

This commit is contained in:
JessonChan 2016-01-12 22:54:39 +08:00
parent 69804afc1b
commit c535dc386e
1 changed files with 2 additions and 1 deletions

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
}