fix: log can not reduce level (#28750)

relate: https://github.com/milvus-io/milvus/issues/28749

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
This commit is contained in:
aoiasd 2023-11-28 10:02:27 +08:00 committed by GitHub
parent 4bd426dbe7
commit ce2436127c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ func InitLogger(cfg *Config, opts ...zap.Option) (*zap.Logger, *ZapProperties, e
return nil, nil, err
}
r.Level.SetLevel(level)
return debugL.WithOptions(zap.IncreaseLevel(level), zap.AddCallerSkip(1)), r, nil
return debugL.WithOptions(zap.AddCallerSkip(1)), r, nil
}
// InitTestLogger initializes a logger for unit tests