From c535dc386e323ef3f92db52728dcca8b60c2a065 Mon Sep 17 00:00:00 2001 From: JessonChan Date: Tue, 12 Jan 2016 22:54:39 +0800 Subject: [PATCH] fast format --- logs/log.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logs/log.go b/logs/log.go index 0a099dfe..12f7f2e7 100644 --- a/logs/log.go +++ b/logs/log.go @@ -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 }