frostfs-node/pkg/services/object/util/log.go
Leonard Lyubich b3dd9a3254 [#607] placement: Make traverser to return list of address groups
Make placement `Traverser.Next` method to return ``[]network.AddressGroup`
in order to support multiple addresses of the storeage nodes.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-28 15:52:50 +03:00

24 lines
751 B
Go

package util
import (
"github.com/nspcc-dev/neofs-node/pkg/network"
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
"go.uber.org/zap"
)
// LogServiceError writes debug error message of object service to provided logger.
func LogServiceError(l *logger.Logger, req string, node network.AddressGroup, err error) {
l.Debug("object service error",
zap.String("node", network.StringifyGroup(node)),
zap.String("request", req),
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()),
)
}