From af9d0894720a99cf80c3a57fc49cd665736a6c0e Mon Sep 17 00:00:00 2001 From: boyce Date: Sat, 23 Feb 2019 11:22:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=97=A5=E5=BF=97=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E6=89=93=E5=8D=B0=E6=BA=90=E7=A0=81=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E5=92=8C=E8=A1=8C=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sysmodule/LogModule.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysmodule/LogModule.go b/sysmodule/LogModule.go index e1d8bf7..6e07b03 100644 --- a/sysmodule/LogModule.go +++ b/sysmodule/LogModule.go @@ -20,7 +20,7 @@ const ( LEVEL_MAX = 6 ) -var LogPrefix = [LEVEL_MAX]string{"[UNKNOW]", "[DEBUG]", "[INFO]", "[WARN]", "[ERROR]", "[FATAL]"} +var LogPrefix = [LEVEL_MAX]string{"[UNKNOW]", "[DEBUG]", "[INFO ]", "[WARN ]", "[ERROR]", "[FATAL]"} type ILogger interface { Printf(level uint, format string, v ...interface{}) @@ -79,7 +79,7 @@ func (slf *LogModule) Printf(level uint, format string, v ...interface{}) { } slf.CheckAndGenFile() - slf.GetLoggerByLevel(level).Printf(format, v...) + slf.GetLoggerByLevel(level).Output(3, fmt.Sprintf(format, v...)) } func (slf *LogModule) Print(level uint, v ...interface{}) { @@ -88,5 +88,5 @@ func (slf *LogModule) Print(level uint, v ...interface{}) { } slf.CheckAndGenFile() - slf.GetLoggerByLevel(level).Print(v...) + slf.GetLoggerByLevel(level).Output(3, fmt.Sprint(v...)) }