Browse Source

隐藏token日志打印

abiao 4 years ago
parent
commit
ef81cfdd00

+ 1 - 1
go/gopath/src/fohow.com/apps/init.go

@@ -556,7 +556,7 @@ func (self *BaseController) GetCdnFullImgUrl(img string) string {
 // ServeJSON sends a json response with encoding charset.
 func (c *BaseController) ServeResultJSON(encoding ...bool) {
 	from := c.GetString("source")
-	beego.BeeLogger.Warn("from--%s", from)
+	//beego.BeeLogger.Warn("from--%s", from)
 	type Result struct {
 		Result interface{} `json:"result"`
 	}

+ 1 - 1
go/gopath/src/fohow.com/apps/models/token_model/token.go

@@ -78,7 +78,7 @@ func GenerateToken(info *JwtUser, expiredSeconds int) (tokenString string, err e
 	// Create the Claims
 	mySigningKey := []byte(KEY)
 	expireAt := time.Now().Add(time.Second * time.Duration(expiredSeconds)).Unix()
-	beego.BeeLogger.Warn("token will be expired at %v ", time.Unix(expireAt, 0))
+	//beego.BeeLogger.Warn("token will be expired at %v ", time.Unix(expireAt, 0))
 
 	// pass parameter to this func or not
 	user := *info