Browse Source

default goroutine recover

marion 5 năm trước cách đây
mục cha
commit
25b7abea07
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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())
 			}
 		}
 	}