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") }