diff --git a/cmd/neofs-node/object.go b/cmd/neofs-node/object.go index 2a0367ca4..d5c1d3375 100644 --- a/cmd/neofs-node/object.go +++ b/cmd/neofs-node/object.go @@ -339,6 +339,7 @@ func initObjectService(c *cfg) { deletesvc.WithLinkingHeader( headsvc.NewRelationHeader(searchsvc.NewLinkingSearcher(sSearch), sHead), ), + deletesvc.WithLogger(c.log), ) sDeleteV2 := deletesvcV2.NewService( diff --git a/pkg/services/object/delete/service.go b/pkg/services/object/delete/service.go index b2175cb4b..5f812b29b 100644 --- a/pkg/services/object/delete/service.go +++ b/pkg/services/object/delete/service.go @@ -10,7 +10,9 @@ import ( putsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/put" objutil "github.com/nspcc-dev/neofs-node/pkg/services/object/util" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" + "github.com/nspcc-dev/neofs-node/pkg/util/logger" "github.com/pkg/errors" + "go.uber.org/zap" ) type Service struct { @@ -33,10 +35,14 @@ type cfg struct { headSvc *headsvc.Service hdrLinking RelationHeader + + log *logger.Logger } func defaultCfg() *cfg { - return new(cfg) + return &cfg{ + log: zap.L(), + } } func NewService(opts ...Option) *Service { @@ -189,3 +195,9 @@ func WithLinkingHeader(v RelationHeader) Option { c.hdrLinking = v } } + +func WithLogger(l *logger.Logger) Option { + return func(c *cfg) { + c.log = l + } +}