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
|
@ -10,13 +10,13 @@ import (
|
|||
|
||||
func (r *request) executeOnContainer(ctx context.Context) {
|
||||
if r.isLocal() {
|
||||
r.log.Debug(logs.GetReturnResultDirectly)
|
||||
r.log.Debug(ctx, logs.GetReturnResultDirectly)
|
||||
return
|
||||
}
|
||||
|
||||
lookupDepth := r.netmapLookupDepth()
|
||||
|
||||
r.log.Debug(logs.TryingToExecuteInContainer,
|
||||
r.log.Debug(ctx, logs.TryingToExecuteInContainer,
|
||||
zap.Uint64("netmap lookup depth", lookupDepth),
|
||||
)
|
||||
|
||||
|
@ -46,7 +46,7 @@ func (r *request) executeOnContainer(ctx context.Context) {
|
|||
}
|
||||
|
||||
func (r *request) processCurrentEpoch(ctx context.Context, localStatus int) bool {
|
||||
r.log.Debug(logs.ProcessEpoch,
|
||||
r.log.Debug(ctx, logs.ProcessEpoch,
|
||||
zap.Uint64("number", r.curProcEpoch),
|
||||
)
|
||||
|
||||
|
@ -67,7 +67,7 @@ func (r *request) processCurrentEpoch(ctx context.Context, localStatus int) bool
|
|||
for {
|
||||
addrs := traverser.Next()
|
||||
if len(addrs) == 0 {
|
||||
r.log.Debug(logs.NoMoreNodesAbortPlacementIteration)
|
||||
r.log.Debug(ctx, logs.NoMoreNodesAbortPlacementIteration)
|
||||
|
||||
return false
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ func (r *request) processCurrentEpoch(ctx context.Context, localStatus int) bool
|
|||
for i := range addrs {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
r.log.Debug(logs.InterruptPlacementIterationByContext,
|
||||
r.log.Debug(ctx, logs.InterruptPlacementIterationByContext,
|
||||
zap.Error(ctx.Err()),
|
||||
)
|
||||
|
||||
|
@ -91,7 +91,7 @@ func (r *request) processCurrentEpoch(ctx context.Context, localStatus int) bool
|
|||
client.NodeInfoFromNetmapElement(&info, addrs[i])
|
||||
|
||||
if r.processNode(ctx, info) {
|
||||
r.log.Debug(logs.GetCompletingTheOperation)
|
||||
r.log.Debug(ctx, logs.GetCompletingTheOperation)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue