[#1770] logger: Refactor Logger component

Make it store its internal `zap.Logger`'s level. Also, make all the
components to accept internal `logger.Logger` instead of `zap.Logger`; it
will simplify future refactor.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-09-28 10:41:01 +03:00 committed by Pavel Karpy
parent 4baf00aa21
commit f037022a7a
83 changed files with 207 additions and 156 deletions

View file

@ -7,11 +7,11 @@ import (
"github.com/nspcc-dev/neofs-node/pkg/core/container"
"github.com/nspcc-dev/neofs-node/pkg/core/netmap"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/pilorama"
"go.uber.org/zap"
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
)
type cfg struct {
log *zap.Logger
log *logger.Logger
key *ecdsa.PrivateKey
rawPub []byte
nmSource netmap.Source
@ -61,7 +61,7 @@ func WithPrivateKey(key *ecdsa.PrivateKey) Option {
}
// WithLogger sets logger for a tree service.
func WithLogger(log *zap.Logger) Option {
func WithLogger(log *logger.Logger) Option {
return func(c *cfg) {
c.log = log
}