[#195] services/object: Write debug log messages on worker pool errors

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-23 15:23:32 +03:00 committed by Alex Vanin
parent fa6e4a3ca4
commit 46dab77705
6 changed files with 26 additions and 8 deletions

View file

@ -14,3 +14,11 @@ func LogServiceError(l *logger.Logger, req string, node *network.Address, err er
zap.String("error", err.Error()),
)
}
// LogWorkerPoolError writes debug error message of object worker pool to provided logger.
func LogWorkerPoolError(l *logger.Logger, req string, err error) {
l.Debug("could not push task to worker pool",
zap.String("request", req),
zap.String("error", err.Error()),
)
}