fix both modify
This commit is contained in:
commit
7ca7596432
14
client.go
14
client.go
@ -230,13 +230,15 @@ func (c *client) getLogInstance(logConf *logger.InputLogConfig) (*zap.Logger, er
|
|||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
loggerInstance *zap.Logger
|
loggerInstance *zap.Logger
|
||||||
|
splitConfig *logger.RotateLogConfig
|
||||||
)
|
)
|
||||||
splitConfig := &logger.RotateLogConfig{
|
if splitConfig, err = logger.NewRotateLogConfig(
|
||||||
TimeIntervalType: logConf.TimeIntervalType,
|
logConf.Path,
|
||||||
LogPath: logConf.Path,
|
logConf.Name,
|
||||||
LogFileName: logConf.Name,
|
logger.WithDivisionChar(logConf.DivisionChar),
|
||||||
DivisionChar: logConf.DivisionChar,
|
logger.WithTimeIntervalType(logConf.TimeIntervalType),
|
||||||
MaxAge: time.Duration(logConf.MaxAge) * time.Second,
|
logger.WithMaxAge(time.Duration(logConf.MaxAge)*time.Second)); nil != err {
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
if loggerInstance, err = logger.NewLogger(zapcore.Level(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
|
||||||
|
Loading…
Reference in New Issue
Block a user