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

manual update #432

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/edwarnicke/serialize v1.0.7
github.com/kelseyhightower/envconfig v1.4.0
github.com/networkservicemesh/api v1.0.1-0.20211110183123-3038992da61a
github.com/networkservicemesh/sdk v0.5.1-0.20211202071606-292c0c4ea23b
github.com/networkservicemesh/sdk v0.5.1-0.20211214175953-a9c6462536d1
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/sirupsen/logrus v1.7.0
github.com/spiffe/go-spiffe/v2 v2.0.0-beta.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS
github.com/nats-io/stan.go v0.10.0/go.mod h1:0jEuBXKauB1HHJswHM/lx05K48TJ1Yxj6VIfM4k+aB4=
github.com/networkservicemesh/api v1.0.1-0.20211110183123-3038992da61a h1:gSujYHmGiOpJyzPGZdW2ymMpmDHCMBdbUMXCVzOtrh8=
github.com/networkservicemesh/api v1.0.1-0.20211110183123-3038992da61a/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU=
github.com/networkservicemesh/sdk v0.5.1-0.20211202071606-292c0c4ea23b h1:g0t17i2/Go2vtRrCBQoiwxskyn9QPCbvhtn9pYsVPi8=
github.com/networkservicemesh/sdk v0.5.1-0.20211202071606-292c0c4ea23b/go.mod h1:9ZCaoauLu+52PLj/BXnYH5w9Pk9jdhaeMA14zb0PUxA=
github.com/networkservicemesh/sdk v0.5.1-0.20211214175953-a9c6462536d1 h1:1m4QBtmYdWv3eINiCoxKHaXk0lk6rQWcefAxNOdpgiE=
github.com/networkservicemesh/sdk v0.5.1-0.20211214175953-a9c6462536d1/go.mod h1:9ZCaoauLu+52PLj/BXnYH5w9Pk9jdhaeMA14zb0PUxA=
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/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
Expand Down
2 changes: 1 addition & 1 deletion internal/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func RunNsmgr(ctx context.Context, configuration *config.Config) error {

_, sLogger, span, sFinish := spanlogger.FromContext(ctx, "cmd-nsmgr")
defer sFinish()
_, lLogger, lFinish := logruslogger.FromSpan(ctx, span, "cmd-nsmgr")
_, lLogger, lFinish := logruslogger.FromSpan(ctx, span, "cmd-nsmgr", map[string]interface{}{})
defer lFinish()
logger := log.Combine(sLogger, lLogger)

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func main() {

_, sLogger, span, sFinish := spanlogger.FromContext(ctx, "cmd-nsmgr")
defer sFinish()
_, lLogger, lFinish := logruslogger.FromSpan(ctx, span, "cmd-nsmgr")
_, lLogger, lFinish := logruslogger.FromSpan(ctx, span, "cmd-nsmgr", map[string]interface{}{})
defer lFinish()
logger := log.Combine(sLogger, lLogger)

Expand Down
3 changes: 2 additions & 1 deletion test/mock/registry/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/edwarnicke/serialize"

"github.com/networkservicemesh/sdk/pkg/tools/grpcutils"
"github.com/networkservicemesh/sdk/pkg/tools/log/logruslogger"

"github.com/sirupsen/logrus"

Expand Down Expand Up @@ -95,7 +96,7 @@ func (s *serverImpl) Start(options ...grpc.ServerOption) error {
}

s.ctx, s.cancel = context.WithCancel(context.Background())
s.ctx = log.WithFields(s.ctx, map[string]interface{}{"cmd": "NsmgrMockRegistry"})
s.ctx = log.WithLog(s.ctx, logruslogger.New(s.ctx, map[string]interface{}{"cmd": "NsmgrMockRegistry"}))

s.errChan = grpcutils.ListenAndServe(s.ctx, s.listenOn, s.server)

Expand Down
3 changes: 2 additions & 1 deletion test/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/edwarnicke/grpcfd"

"github.com/networkservicemesh/sdk/pkg/tools/log"
"github.com/networkservicemesh/sdk/pkg/tools/log/logruslogger"
"github.com/networkservicemesh/sdk/pkg/tools/spiffejwt"
"github.com/networkservicemesh/sdk/pkg/tools/token"

Expand Down Expand Up @@ -76,7 +77,7 @@ type testSetup struct {
func (s *testSetup) init() {
s.ctx, s.cancel = context.WithCancel(context.Background())

s.ctx = log.WithFields(s.ctx, map[string]interface{}{"cmd": "NsmgrTestSetup"})
s.ctx = log.WithLog(s.ctx, logruslogger.New(s.ctx, map[string]interface{}{"cmd": "NsmgrTestSetup"}))

s.baseDir = TempFolder()

Expand Down