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

@@ -6,7 +6,7 @@ import (
"mayfly-go/internal/sys/domain/repository"
"mayfly-go/pkg/biz"
"mayfly-go/pkg/cache"
"mayfly-go/pkg/global"
"mayfly-go/pkg/logx"
"mayfly-go/pkg/model"
"mayfly-go/pkg/utils/jsonx"
"strings"
@@ -61,7 +61,7 @@ func (a *configAppImpl) GetConfig(key string) *entity.Config {
}
if err := a.configRepo.GetConfig(config, "Id", "Key", "Value", "Permission"); err != nil {
global.Log.Warnf("不存在key = [%s] 的系统配置", key)
logx.Warnf("不存在key = [%s] 的系统配置", key)
} else {
cache.SetStr(SysConfigKeyPrefix+key, jsonx.ToStr(config), -1)
}