更新日志依赖
This commit is contained in:
parent
a5bde3ca5b
commit
d5a6be378b
@ -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"
|
||||||
@ -234,10 +236,9 @@ func (c *client) getLogInstance(logConf *logger.InputLogConfig) (*zap.Logger, er
|
|||||||
LogPath: logConf.Path,
|
LogPath: logConf.Path,
|
||||||
LogFileName: logConf.Name,
|
LogFileName: logConf.Name,
|
||||||
DivisionChar: logConf.DivisionChar,
|
DivisionChar: logConf.DivisionChar,
|
||||||
FullLogFormat: logConf.Format,
|
|
||||||
MaxAge: time.Duration(logConf.MaxAge) * time.Second,
|
MaxAge: time.Duration(logConf.MaxAge) * time.Second,
|
||||||
}
|
}
|
||||||
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
2
go.mod
@ -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
2
go.sum
@ -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=
|
||||||
|
Loading…
Reference in New Issue
Block a user