Skip to content

Commit

Permalink
fix: removed logrus from vendor plugin
Browse files Browse the repository at this point in the history
Signed-off-by: atulpatel261194 <[email protected]>
  • Loading branch information
atulpatel261194 committed Sep 2, 2024
1 parent b253b86 commit d67c1f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ require (
github.com/philippgille/gokv/gomap v0.6.0
github.com/philippgille/gokv/redis v0.6.0
github.com/roman-kachanovsky/go-binary-pack v0.0.0-20170214094030-e260e0dc6732
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.16.0
github.com/vektra/mockery/v2 v2.38.0
Expand Down Expand Up @@ -180,6 +179,7 @@ require (
github.com/sashamelentyev/usestdlibvars v1.24.0 // indirect
github.com/securego/gosec/v2 v2.18.2 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sivchari/containedctx v1.0.3 // indirect
github.com/sivchari/nosnakecase v1.7.0 // indirect
github.com/sivchari/tenv v1.7.1 // indirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"log"
"time"

logr "github.com/sirupsen/logrus"
"google.golang.org/grpc"

p4_v1 "github.com/p4lang/p4runtime/go/p4/v1"
Expand Down Expand Up @@ -256,10 +255,10 @@ func NewP4RuntimeClient(binPath string, p4infoPath string, conn *grpc.ClientConn
c := p4_v1.NewP4RuntimeClient(conn)
resp, err := c.Capabilities(Ctx, &p4_v1.CapabilitiesRequest{})
if err != nil {
logr.Fatalf("intel-e2000: Error in Capabilities RPC: %v", err)
log.Println("intel-e2000: Error in Capabilities RPC: %v", err)

Check failure on line 258 in pkg/evpn/vendor_plugins/intel-e2000/p4runtime/p4driverapi/p4ctl.go

View workflow job for this annotation

GitHub Actions / call / build (1.21)

log.Println call has possible Printf formatting directive %v

Check failure on line 258 in pkg/evpn/vendor_plugins/intel-e2000/p4runtime/p4driverapi/p4ctl.go

View workflow job for this annotation

GitHub Actions / call / build (1.22)

log.Println call has possible Printf formatting directive %v
return err
}
logr.Infof("intel-e2000: P4Runtime server version is %s", resp.P4RuntimeApiVersion)
log.Println("intel-e2000: P4Runtime server version is %s", resp.P4RuntimeApiVersion)

Check failure on line 261 in pkg/evpn/vendor_plugins/intel-e2000/p4runtime/p4driverapi/p4ctl.go

View workflow job for this annotation

GitHub Actions / call / build (1.21)

log.Println call has possible Printf formatting directive %s

Check failure on line 261 in pkg/evpn/vendor_plugins/intel-e2000/p4runtime/p4driverapi/p4ctl.go

View workflow job for this annotation

GitHub Actions / call / build (1.22)

log.Println call has possible Printf formatting directive %s

electionID := &p4_v1.Uint128{High: 0, Low: 1}

Expand All @@ -277,13 +276,13 @@ func NewP4RuntimeClient(binPath string, p4infoPath string, conn *grpc.ClientConn
sent := false
for isPrimary := range arbitrationCh {
if isPrimary {
logr.Infof("We are the primary client!")
log.Println("We are the primary client!")
if !sent {
waitCh <- struct{}{}
sent = true
}
} else {
logr.Infof("We are not the primary client!")
log.Println("We are not the primary client!")
}
}
}()
Expand All @@ -294,15 +293,15 @@ func NewP4RuntimeClient(binPath string, p4infoPath string, conn *grpc.ClientConn
defer cancel()
select {
case <-Ctx2.Done():
logr.Fatalf("Could not become the primary client within %v", timeout)
log.Fatal("Could not become the primary client within %v", timeout)

Check failure on line 296 in pkg/evpn/vendor_plugins/intel-e2000/p4runtime/p4driverapi/p4ctl.go

View workflow job for this annotation

GitHub Actions / call / build (1.21)

log.Fatal call has possible Printf formatting directive %v

Check failure on line 296 in pkg/evpn/vendor_plugins/intel-e2000/p4runtime/p4driverapi/p4ctl.go

View workflow job for this annotation

GitHub Actions / call / build (1.22)

log.Fatal call has possible Printf formatting directive %v
case <-errs:
logr.Fatalf("Could not get the client within %v", timeout)
log.Fatal("Could not get the client within %v", timeout)

Check failure on line 298 in pkg/evpn/vendor_plugins/intel-e2000/p4runtime/p4driverapi/p4ctl.go

View workflow job for this annotation

GitHub Actions / call / build (1.21)

log.Fatal call has possible Printf formatting directive %v

Check failure on line 298 in pkg/evpn/vendor_plugins/intel-e2000/p4runtime/p4driverapi/p4ctl.go

View workflow job for this annotation

GitHub Actions / call / build (1.22)

log.Fatal call has possible Printf formatting directive %v
case <-waitCh:
}
}()
logr.Info("Setting forwarding pipe")
log.Println("Setting forwarding pipe")
if _, err := P4RtC.SetFwdPipe(Ctx, binPath, p4infoPath, 0); err != nil {
logr.Fatalf("Error when setting forwarding pipe: %v", err)
log.Fatal("Error when setting forwarding pipe: %v", err)

Check failure on line 304 in pkg/evpn/vendor_plugins/intel-e2000/p4runtime/p4driverapi/p4ctl.go

View workflow job for this annotation

GitHub Actions / call / build (1.21)

log.Fatal call has possible Printf formatting directive %v

Check failure on line 304 in pkg/evpn/vendor_plugins/intel-e2000/p4runtime/p4driverapi/p4ctl.go

View workflow job for this annotation

GitHub Actions / call / build (1.22)

log.Fatal call has possible Printf formatting directive %v
return err
}
return nil
Expand Down

0 comments on commit d67c1f0

Please sign in to comment.