Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use new logger in net/api #420

Merged
merged 2 commits into from
May 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions net/api/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ package api
import (
"context"

logging "github.com/ipfs/go-log/v2"
libpeer "github.com/libp2p/go-libp2p-core/peer"
ma "github.com/multiformats/go-multiaddr"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/sourcenetwork/defradb/logging"
"github.com/sourcenetwork/defradb/net"
pb "github.com/sourcenetwork/defradb/net/api/pb"
)

var (
log = logging.Logger("netapi")
log = logging.MustNewLogger("defra.netapi")
)

type Service struct {
Expand All @@ -41,7 +41,7 @@ func (s *Service) AddReplicator(
ctx context.Context,
req *pb.AddReplicatorRequest,
) (*pb.AddReplicatorReply, error) {
log.Debug("Received AddReplicator requeust")
log.Debug(ctx, "Received AddReplicator request")

collection := string(req.Collection)
if len(collection) == 0 {
Expand Down