From f93ad64ea31ed78d1de020557c1185c1631a8f3d Mon Sep 17 00:00:00 2001 From: boyce Date: Fri, 29 Mar 2019 11:25:27 +0800 Subject: [PATCH] fixed log print format --- sysmodule/LogModule.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysmodule/LogModule.go b/sysmodule/LogModule.go index 5ddb239..d0a7cb1 100644 --- a/sysmodule/LogModule.go +++ b/sysmodule/LogModule.go @@ -123,8 +123,8 @@ func (slf *LogModule) Printf(level uint, format string, v ...interface{}) { file = parts[len(parts)-1] } - format = LogPrefix[level] + time.Now().Format("2006/1/2 15:04:05") + fmt.Sprintf(" %s:%d:", file, line) + format - slf.listenFun(level, fmt.Sprintf(format, v...)) + ft := LogPrefix[level] + time.Now().Format("2006/1/2 15:04:05") + fmt.Sprintf(" %s:%d:", file, line) + format + slf.listenFun(level, fmt.Sprintf(ft, v...)) } }