From 7cb5ecc1819cd9887492134157cd8809c51e474e Mon Sep 17 00:00:00 2001 From: liangzy Date: Fri, 24 Apr 2020 17:34:39 +0800 Subject: [PATCH] =?UTF-8?q?v1.2.0=20=E6=95=B4=E4=B8=AAbeegolog=20=E6=89=93?= =?UTF-8?q?=E8=BF=9B=E5=8E=BB=EF=BC=8C=20=E5=A2=9E=E5=8A=A0syncmap?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E9=80=9A=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- log.go | 3 +-- log_test.go | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/log.go b/log.go index 89e3b8b..d2070a8 100644 --- a/log.go +++ b/log.go @@ -75,7 +75,6 @@ func GetLogger(name string) *Logger { } wd, _ := os.Getwd() - fmt.Println(wd) conf1 := FileLogConfig{ Filename: path.Join(wd, fmt.Sprintf("runtime/logs/%s.log", name)), @@ -94,7 +93,7 @@ func GetLogger(name string) *Logger { confString, _ := json.Marshal(&conf1) confString2, _ := json.Marshal(&conf2) l := new(Logger) - l.BeeLogger = logs.NewLogger() + l.BeeLogger = logs.NewLogger(1000) l.SetLogger(logs.AdapterFile, bytes.NewBuffer(confString).String()) l.SetLogger(logs.AdapterConsole, bytes.NewBuffer(confString2).String()) l.BeeLogger.SetPrefix("_" + name) diff --git a/log_test.go b/log_test.go index 67d0243..242637e 100644 --- a/log_test.go +++ b/log_test.go @@ -5,7 +5,8 @@ import ( ) func TestGetLogger(t *testing.T) { - GetLogger("nds").Debug("我正在调试") - GetLogger("nds").Critical("出错了") + l := GetLogger("nds") + l.Debug("我正在调试") + l.Critical("出错了") GetLogger("wifi").Critical("hello wifi") }