From f7a20f36706351c7643850887af074ba875ef9a0 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 2 Jun 2023 12:15:32 +0800 Subject: [PATCH] fix --- utils/auth/auth.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/auth/auth.go b/utils/auth/auth.go index 6f62c4eb..c219c106 100644 --- a/utils/auth/auth.go +++ b/utils/auth/auth.go @@ -3,7 +3,7 @@ package auth import ( "encoding/json" "github.com/golang-jwt/jwt" - "log" + "github.com/zeromicro/go-zero/core/logx" "net/http" "time" ) @@ -58,13 +58,13 @@ func CheckAuth(r *http.Request) UserInfo { token = r.Header.Get("Auth-Key") } if token == "" { - log.Println("token is empty") + logx.Debug("token is empty") return UserInfo{} } //解析token userInfo, err := ParseJwtToken(token) if err != nil { - log.Println(err) + logx.Debug(err) return UserInfo{} } return userInfo