fix: [Cherry-pick] log can not reduce level (#28770)

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

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
This commit is contained in:
aoiasd 2023-11-28 16:26:33 +08:00 committed by GitHub
parent 224f2755c5
commit cbb05a2d52
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