Skip to content

Commit

Permalink
Merge pull request networkservicemesh#104 from glazychev-art/logger
Browse files Browse the repository at this point in the history
Update to new logger usage
  • Loading branch information
haiodo authored Jan 25, 2021
2 parents d662c03 + 2451f63 commit cf83dbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/golang/protobuf v1.4.3
github.com/google/uuid v1.1.2
github.com/networkservicemesh/api v0.0.0-20210112152104-45029fb10e27
github.com/networkservicemesh/sdk v0.0.0-20210120064752-943735566550
github.com/networkservicemesh/sdk v0.0.0-20210122163758-b1f2892a6728
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.6.1
github.com/vishvananda/netlink v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ github.com/nats-io/stan.go v0.6.0/go.mod h1:eIcD5bi3pqbHT/xIIvXMwvzXYElgouBvaVRf
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU=
github.com/networkservicemesh/api v0.0.0-20210112152104-45029fb10e27 h1:J0UPj3sYfEvXwMHyAOiQ++NU7a3cZGZST1s1ftyC0uQ=
github.com/networkservicemesh/api v0.0.0-20210112152104-45029fb10e27/go.mod h1:qvxdY1Zt4QTtiG+uH1XmjpegeHjlt5Jj4A8iK55iJPI=
github.com/networkservicemesh/sdk v0.0.0-20210120064752-943735566550 h1:2dfh+H5pqTJKcAodLk1wi5+fhu1y4AxoobPVGmgR0yM=
github.com/networkservicemesh/sdk v0.0.0-20210120064752-943735566550/go.mod h1:LV9NIA44LDUs0moEnrfeeRKQPA3Qdu3JiBhSwzEbXSM=
github.com/networkservicemesh/sdk v0.0.0-20210122163758-b1f2892a6728 h1:+5IMj2KvZR7wOC/5229YVPSMXTLp/SMIybQemxEaYtg=
github.com/networkservicemesh/sdk v0.0.0-20210122163758-b1f2892a6728/go.mod h1:LV9NIA44LDUs0moEnrfeeRKQPA3Qdu3JiBhSwzEbXSM=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nishanths/exhaustive v0.0.0-20200811152831-6cf413ae40e0/go.mod h1:wBEpHwM2OdmeNpdCvRPUlkEbBuaFmcK4Wv8Q7FuGW3c=
Expand Down
6 changes: 3 additions & 3 deletions pkg/kernel/networkservice/inject/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/networkservicemesh/api/pkg/api/networkservice"
"github.com/networkservicemesh/api/pkg/api/networkservice/mechanisms/kernel"
"github.com/networkservicemesh/sdk/pkg/networkservice/core/next"
"github.com/networkservicemesh/sdk/pkg/tools/log"
"github.com/networkservicemesh/sdk/pkg/tools/logger"

"github.com/networkservicemesh/sdk-kernel/pkg/kernel/tools/nshandle"
)
Expand All @@ -42,7 +42,7 @@ func NewServer() networkservice.NetworkServiceServer {
}

func (s *injectServer) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*networkservice.Connection, error) {
logEntry := log.Entry(ctx).WithField("injectServer", "Request")
logEntry := logger.Log(ctx).WithField("injectServer", "Request")

connID := request.GetConnection().GetId()
mech := kernel.ToMechanism(request.GetConnection().GetMechanism())
Expand Down Expand Up @@ -82,7 +82,7 @@ func (s *injectServer) Request(ctx context.Context, request *networkservice.Netw
}

func (s *injectServer) Close(ctx context.Context, conn *networkservice.Connection) (*empty.Empty, error) {
logEntry := log.Entry(ctx).WithField("injectServer", "Close")
logEntry := logger.Log(ctx).WithField("injectServer", "Close")

_, err := next.Server(ctx).Close(ctx, conn)

Expand Down

0 comments on commit cf83dbe

Please sign in to comment.