[#1437] node: Use ctx for logging

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-10-21 10:22:54 +03:00
parent c16dae8b4d
commit 6db46257c0
Signed by: dstepanov-yadro
GPG key ID: 237AF1A763293BC0
157 changed files with 764 additions and 713 deletions

View file

@ -60,7 +60,7 @@ func (c *cache) setMode(ctx context.Context, m mode.Mode, prm setModePrm) error
// flushCh is populated by `flush` with `modeMtx` taken, thus waiting until it is empty
// guarantees that there are no in-fly operations.
for len(c.flushCh) != 0 {
c.log.Info(logs.WritecacheWaitingForChannelsToFlush)
c.log.Info(ctx, logs.WritecacheWaitingForChannelsToFlush)
time.Sleep(time.Second)
}
@ -110,7 +110,7 @@ func (c *cache) closeStorage(ctx context.Context, shrink bool) error {
return fmt.Errorf("failed to remove write-cache files: %w", err)
}
} else {
c.log.Info(logs.WritecacheShrinkSkippedNotEmpty)
c.log.Info(ctx, logs.WritecacheShrinkSkippedNotEmpty)
}
return nil
}