Jelajahi Sumber

default goroutine recover

marion 5 tahun lalu
induk
melakukan
25b7abea07
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      utils/goroutine_recover.go

+ 2 - 2
utils/goroutine_recover.go

@@ -2,7 +2,7 @@ package utils
 
 import (
 	"git.haoqitour.com/haoqi/go-common/utils/logger"
-	"github.com/prometheus/common/log"
+	"log"
 )
 
 func DefaultGoroutineRecover(l *logger.Logger, action string) {
@@ -11,7 +11,7 @@ func DefaultGoroutineRecover(l *logger.Logger, action string) {
 			if nil != l {
 				l.WithField("err", e.Error()).Error(action, " goroutine 异常")
 			} else {
-				log.Warn(action, " goroutine 异常 ", e.Error())
+				log.Print(action, " goroutine 异常 ", e.Error())
 			}
 		}
 	}