refactor: slog替换logrus、日志操作统一、支持json、text格式等

This commit is contained in:
meilin.huang
2023-09-02 17:24:18 +08:00
parent d51cd4b289
commit 899a3a8243
47 changed files with 685 additions and 293 deletions

View File

@@ -1,7 +1,7 @@
package cache
import (
"mayfly-go/pkg/global"
"mayfly-go/pkg/logx"
"mayfly-go/pkg/rediscli"
"strconv"
"time"
@@ -33,7 +33,7 @@ func GetInt(key string) int {
return 0
}
if intV, err := strconv.Atoi(val); err != nil {
global.Log.Error("获取缓存中的int值转换失败", err)
logx.Error("获取缓存中的int值转换失败", err)
return 0
} else {
return intV