frostfs-node/pkg/services/object/util/log.go
Leonard Lyubich fa6e4a3ca4 [#195] services/object: Write debug log messages on internal service errors
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-24 13:38:06 +03:00

16 lines
448 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.Address, err error) {
l.Debug("object service error",
zap.Stringer("node", node),
zap.String("request", req),
zap.String("error", err.Error()),
)
}