forked from TrueCloudLab/frostfs-node
[#1437] node: Use ctx for logging
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c16dae8b4d
commit
6db46257c0
157 changed files with 764 additions and 713 deletions
|
@ -87,7 +87,7 @@ func New(opts ...Option) *FSTree {
|
|||
DirNameLen: DirNameLen,
|
||||
metrics: &noopMetrics{},
|
||||
fileCounter: &noopCounter{},
|
||||
log: &logger.Logger{Logger: zap.L()},
|
||||
log: logger.NewLoggerWrapper(zap.L()),
|
||||
}
|
||||
for i := range opts {
|
||||
opts[i](f)
|
||||
|
@ -152,7 +152,7 @@ func (t *FSTree) iterate(ctx context.Context, depth uint64, curPath []string, pr
|
|||
des, err := os.ReadDir(dirPath)
|
||||
if err != nil {
|
||||
if prm.IgnoreErrors {
|
||||
t.log.Warn(logs.BlobstorErrorOccurredDuringTheIteration,
|
||||
t.log.Warn(ctx, logs.BlobstorErrorOccurredDuringTheIteration,
|
||||
zap.String("err", err.Error()),
|
||||
zap.String("directory_path", dirPath))
|
||||
return nil
|
||||
|
@ -200,7 +200,7 @@ func (t *FSTree) iterate(ctx context.Context, depth uint64, curPath []string, pr
|
|||
}
|
||||
if err != nil {
|
||||
if prm.IgnoreErrors {
|
||||
t.log.Warn(logs.BlobstorErrorOccurredDuringTheIteration,
|
||||
t.log.Warn(ctx, logs.BlobstorErrorOccurredDuringTheIteration,
|
||||
zap.Stringer("address", addr),
|
||||
zap.String("err", err.Error()),
|
||||
zap.String("path", path))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue