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

Change message log level #753

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
9 changes: 3 additions & 6 deletions pkg/networkservice/acl/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package acl

import (
"context"
"fmt"
"time"

"github.com/networkservicemesh/govpp/binapi/acl"
Expand All @@ -42,10 +41,9 @@ func create(ctx context.Context, vppConn api.Connection, tag string, isClient bo

swIfIndex, ok := ifindex.Load(ctx, isClient)
if !ok {
logger.Info("swIfIndex not found")
return nil, errors.New("swIfIndex not found")
}
logger.Infof(fmt.Sprintf("swIfIndex=%v", swIfIndex))
logger.Debugf("swIfIndex=%v", swIfIndex)

interfaceACLList := &acl.ACLInterfaceSetACLList{
SwIfIndex: swIfIndex,
Expand All @@ -54,22 +52,21 @@ func create(ctx context.Context, vppConn api.Connection, tag string, isClient bo
var err error
interfaceACLList.Acls, err = addACLToACLList(ctx, vppConn, tag, false, aRules)
if err != nil {
logger.Info("error adding acl to acl list ingress")
logger.Debug("error adding acl to acl list ingress")
return nil, err
}
interfaceACLList.NInput = uint8(len(interfaceACLList.Acls))

egressACLIndeces, err := addACLToACLList(ctx, vppConn, tag, true, aRules)
if err != nil {
logger.Info("error adding acl to acl list egress")
logger.Debug("error adding acl to acl list egress")
return nil, err
}
interfaceACLList.Acls = append(interfaceACLList.Acls, egressACLIndeces...)
interfaceACLList.Count = uint8(len(interfaceACLList.Acls))

_, err = acl.NewServiceClient(vppConn).ACLInterfaceSetACLList(ctx, interfaceACLList)
if err != nil {
logger.Info("error setting acl list for interface")
return nil, errors.Wrap(err, "vppapi ACLInterfaceSetACLList returned error")
}
return interfaceACLList.Acls, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/networkservice/acl/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (a *aclServer) Close(ctx context.Context, conn *networkservice.Connection)
for ind := range indices {
_, err := acl.NewServiceClient(a.vppConn).ACLDel(ctx, &acl.ACLDel{ACLIndex: uint32(ind)})
if err != nil {
log.FromContext(ctx).Infof("ACL_SERVER: error deleting acls")
log.FromContext(ctx).Debug("ACL_SERVER: error deleting acls")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func routeAddDel(ctx context.Context, vppConn api.Connection, swIfIndex interfac
WithField("tableID", tableID).
WithField("isAdd", isAdd).
WithField("duration", time.Since(now)).
WithField("vppapi", "IPRouteAddDel").Info("completed")
WithField("vppapi", "IPRouteAddDel").Debug("completed")
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/networkservice/up/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ func initFunc(ctx context.Context, vppConn api.Connection) error {
}
log.FromContext(ctx).
WithField("duration", time.Since(now)).
WithField("vppapi", "WantInterfaceEvents").Info("completed")
WithField("vppapi", "WantInterfaceEvents").Debug("completed")
return nil
}
2 changes: 1 addition & 1 deletion pkg/networkservice/up/peerup/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func getAPIChannel(ctx context.Context, vppConn Connection, peerIndex uint32) (a
}
log.FromContext(ctx).
WithField("duration", time.Since(now)).
WithField("vppapi", "WantWireguardPeerEvents").Info("completed")
WithField("vppapi", "WantWireguardPeerEvents").Debug("completed")

go func() {
<-ctx.Done()
Expand Down
2 changes: 1 addition & 1 deletion pkg/networkservice/vl3lb/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (lb *vl3lbClient) balanceNSE(ctx context.Context, loggerLb log.Logger, lbVp
logger.Errorf("failed to dial: %v, URL: %v, err: %v", nse.Name, urlNSE.String(), err.Error())
return
}
logger.Info("connected")
logger.Debug("connected")

// 3. Monitor all connections containing the vl3-NSE name
monitorClientNse := networkservice.NewMonitorConnectionClient(ccMonitor)
Expand Down
4 changes: 2 additions & 2 deletions pkg/networkservice/xconnect/l2bridgedomain/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func addDelVppBridgeDomain(ctx context.Context, vppConn api.Connection, bridgeID
WithField("bridgeID", rsp.BdID).
WithField("isAdd", isAdd).
WithField("duration", time.Since(now)).
WithField("vppapi", "BridgeDomainAddDelV2").Info("completed")
WithField("vppapi", "BridgeDomainAddDelV2").Debug("completed")
return rsp.BdID, nil
}

Expand All @@ -175,7 +175,7 @@ func addDelVppInterfaceBridgeDomain(ctx context.Context, vppConn api.Connection,
WithField("isAdd", isAdd).
WithField("shg", shg).
WithField("duration", time.Since(now)).
WithField("vppapi", "SwInterfaceSetL2Bridge").Info("completed")
WithField("vppapi", "SwInterfaceSetL2Bridge").Debug("completed")
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/networkservice/xconnect/l2xconnect/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func addDel(ctx context.Context, vppConn api.Connection, addDel bool) error {
vlanID, ok := vlan.Load(ctx, true)
if ok {
log.FromContext(ctx).
WithField("VLAN-ID", vlanID).Info("bridge is used instead of xconnect")
WithField("VLAN-ID", vlanID).Debug("bridge is used instead of xconnect")
return nil
}

Expand Down
Loading