Compare commits

..

2 Commits

Author SHA1 Message Date
7ca7596432 fix both modify 2022-06-25 18:47:40 +08:00
d5a6be378b 更新日志依赖 2022-06-25 18:46:28 +08:00
3 changed files with 6 additions and 2 deletions

View File

@ -15,6 +15,8 @@ import (
"sync" "sync"
"time" "time"
"go.uber.org/zap/zapcore"
"git.zhangdeman.cn/zhangdeman/util" "git.zhangdeman.cn/zhangdeman/util"
"git.zhangdeman.cn/zhangdeman/logger/wrapper" "git.zhangdeman.cn/zhangdeman/logger/wrapper"
@ -238,7 +240,7 @@ func (c *client) getLogInstance(logConf *logger.InputLogConfig) (*zap.Logger, er
logger.WithMaxAge(time.Duration(logConf.MaxAge)*time.Second)); nil != err { logger.WithMaxAge(time.Duration(logConf.MaxAge)*time.Second)); nil != err {
return nil, err return nil, err
} }
if loggerInstance, err = logger.NewLogger(logConf.LogLevel, splitConfig, logConfList...); nil != err { if loggerInstance, err = logger.NewLogger(zapcore.Level(logConf.LogLevel), splitConfig, logConfList...); nil != err {
return nil, err return nil, err
} }
return loggerInstance, nil return loggerInstance, nil

2
go.mod
View File

@ -3,7 +3,7 @@ module git.zhangdeman.cn/zhangdeman/mysql
go 1.17 go 1.17
require ( require (
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220612104513-3f63f6c673f5 git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220625104127-fff01c440556
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220609072516-022a755fdf2f git.zhangdeman.cn/zhangdeman/util v0.0.0-20220609072516-022a755fdf2f
github.com/gin-gonic/gin v1.7.7 github.com/gin-gonic/gin v1.7.7
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1

2
go.sum
View File

@ -1,5 +1,7 @@
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220612104513-3f63f6c673f5 h1:avCnxHO3ubhYwz+DNFE+0OjHUJq+P2R53pKiq8dFLjM= git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220612104513-3f63f6c673f5 h1:avCnxHO3ubhYwz+DNFE+0OjHUJq+P2R53pKiq8dFLjM=
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220612104513-3f63f6c673f5/go.mod h1:0A5BV9pE31nuFE60TLbP7BIhhV/fcWoi+fHrcV2clJw= git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220612104513-3f63f6c673f5/go.mod h1:0A5BV9pE31nuFE60TLbP7BIhhV/fcWoi+fHrcV2clJw=
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220625104127-fff01c440556 h1:3YRp/uclhv3TNyxEst7DTC7v38uHnky7llZVmgiaOPU=
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220625104127-fff01c440556/go.mod h1:0A5BV9pE31nuFE60TLbP7BIhhV/fcWoi+fHrcV2clJw=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220609072516-022a755fdf2f h1:yAxxukVUdSM5wn264el+QiAEB0OBN/5H7Xw9Z6rLzUY= git.zhangdeman.cn/zhangdeman/util v0.0.0-20220609072516-022a755fdf2f h1:yAxxukVUdSM5wn264el+QiAEB0OBN/5H7Xw9Z6rLzUY=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220609072516-022a755fdf2f/go.mod h1:YI/XeTmrr9+8dxa4ThPkmNcEE8WHG5pZkKujpSWwIxM= git.zhangdeman.cn/zhangdeman/util v0.0.0-20220609072516-022a755fdf2f/go.mod h1:YI/XeTmrr9+8dxa4ThPkmNcEE8WHG5pZkKujpSWwIxM=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=