[#1052] Tidy INFO logs

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-12-22 19:19:31 +03:00 committed by Alex Vanin
parent 96efe0f294
commit 5d46035ae8
3 changed files with 10 additions and 7 deletions

View file

@ -45,7 +45,7 @@ func (p *Replicator) Run(ctx context.Context) {
// HandleTask executes replication task inside invoking goroutine.
func (p *Replicator) HandleTask(ctx context.Context, task *Task) {
defer func() {
p.log.Info("finish work",
p.log.Debug("finish work",
zap.Uint32("amount of unfinished replicas", task.quantity),
)
}()
@ -67,7 +67,10 @@ func (p *Replicator) HandleTask(ctx context.Context, task *Task) {
default:
}
log := p.log.With(zap.String("node", hex.EncodeToString(task.nodes[i].PublicKey())))
log := p.log.With(
zap.String("node", hex.EncodeToString(task.nodes[i].PublicKey())),
zap.Stringer("object", task.addr),
)
callCtx, cancel := context.WithTimeout(ctx, p.putTimeout)
@ -80,7 +83,7 @@ func (p *Replicator) HandleTask(ctx context.Context, task *Task) {
zap.String("error", err.Error()),
)
} else {
log.Info("object successfully replicated")
log.Debug("object successfully replicated")
task.quantity--
}