forked from TrueCloudLab/frostfs-node
[#240] logs: Move log messages to constants
Drop duplicate entities. Format entities. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com> Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
d29b13454f
commit
0e31c12e63
149 changed files with 1481 additions and 687 deletions
|
@ -3,19 +3,20 @@ package getsvc
|
|||
import (
|
||||
"context"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/client"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func (exec *execCtx) executeOnContainer(ctx context.Context) {
|
||||
if exec.isLocal() {
|
||||
exec.log.Debug("return result directly")
|
||||
exec.log.Debug(logs.GetReturnResultDirectly)
|
||||
return
|
||||
}
|
||||
|
||||
lookupDepth := exec.netmapLookupDepth()
|
||||
|
||||
exec.log.Debug("trying to execute in container...",
|
||||
exec.log.Debug(logs.GetTryingToExecuteInContainer,
|
||||
zap.Uint64("netmap lookup depth", lookupDepth),
|
||||
)
|
||||
|
||||
|
@ -43,7 +44,7 @@ func (exec *execCtx) executeOnContainer(ctx context.Context) {
|
|||
}
|
||||
|
||||
func (exec *execCtx) processCurrentEpoch(ctx context.Context) bool {
|
||||
exec.log.Debug("process epoch",
|
||||
exec.log.Debug(logs.GetProcessEpoch,
|
||||
zap.Uint64("number", exec.curProcEpoch),
|
||||
)
|
||||
|
||||
|
@ -60,7 +61,7 @@ func (exec *execCtx) processCurrentEpoch(ctx context.Context) bool {
|
|||
for {
|
||||
addrs := traverser.Next()
|
||||
if len(addrs) == 0 {
|
||||
exec.log.Debug("no more nodes, abort placement iteration")
|
||||
exec.log.Debug(logs.GetNoMoreNodesAbortPlacementIteration)
|
||||
|
||||
return false
|
||||
}
|
||||
|
@ -68,7 +69,7 @@ func (exec *execCtx) processCurrentEpoch(ctx context.Context) bool {
|
|||
for i := range addrs {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
exec.log.Debug("interrupt placement iteration by context",
|
||||
exec.log.Debug(logs.GetInterruptPlacementIterationByContext,
|
||||
zap.String("error", ctx.Err().Error()),
|
||||
)
|
||||
|
||||
|
@ -84,7 +85,7 @@ func (exec *execCtx) processCurrentEpoch(ctx context.Context) bool {
|
|||
client.NodeInfoFromNetmapElement(&info, addrs[i])
|
||||
|
||||
if exec.processNode(ctx, info) {
|
||||
exec.log.Debug("completing the operation")
|
||||
exec.log.Debug(logs.GetCompletingTheOperation)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue