From 271afd284002472ebbb39f8284c1605af17437d3 Mon Sep 17 00:00:00 2001 From: zhangxin Date: Fri, 16 Apr 2021 16:33:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=B5=8B=E8=AF=95=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infra/logger/logger.go | 5 ----- infra/logger/utils.go | 1 - 2 files changed, 6 deletions(-) diff --git a/infra/logger/logger.go b/infra/logger/logger.go index 06d92f5..9a60da2 100644 --- a/infra/logger/logger.go +++ b/infra/logger/logger.go @@ -2,7 +2,6 @@ package logger import ( "errors" - "fmt" json "github.com/json-iterator/go" "sync" ) @@ -61,20 +60,16 @@ func initLogger(module string, operator string) (Log, error) { levelInt := changeToInt(value.Level) // 初始化db driver if value.DriverType == "db" { - fmt.Println("here db") driverConfig, exist := outputConfig.DB[value.DriverName] if !exist { continue } - fmt.Println("here db", driverConfig) switch driverConfig.DBType { case "mongo": - fmt.Println("mongo begin") driver, err := NewMongoDriver(driverConfig, levelInt) if err != nil { return nil, err } - fmt.Println("driver:", driver) innerLog.output = append(innerLog.output, driver) } } else if value.DriverType == "file" { // 初始话file driver diff --git a/infra/logger/utils.go b/infra/logger/utils.go index 5eb0697..23c381c 100644 --- a/infra/logger/utils.go +++ b/infra/logger/utils.go @@ -29,7 +29,6 @@ func getCaller(skip int) string { if !ok { return "" } - fmt.Println(pc, file) fileName := path.Base(file) funcName := runtime.FuncForPC(pc).Name() return fmt.Sprintf("file:%v;function:%v;line:%d", fileName, funcName, line)