Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
network: Always call network logger function
Browse files Browse the repository at this point in the history
Rather than using the virtcontainers logger, always call the network
logger function.

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jodh-intel committed Jul 30, 2018
1 parent f4a7712 commit a0be57f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions virtcontainers/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func (n *NetworkNamespace) UnmarshalJSON(b []byte) error {
}

endpoints = append(endpoints, &endpoint)
virtLog.Infof("Physical endpoint unmarshalled [%v]", endpoint)
networkLogger().Infof("Physical endpoint unmarshalled [%v]", endpoint)

case VirtualEndpointType:
var endpoint VirtualEndpoint
Expand All @@ -499,7 +499,7 @@ func (n *NetworkNamespace) UnmarshalJSON(b []byte) error {
}

endpoints = append(endpoints, &endpoint)
virtLog.Infof("Virtual endpoint unmarshalled [%v]", endpoint)
networkLogger().Infof("Virtual endpoint unmarshalled [%v]", endpoint)

case VhostUserEndpointType:
var endpoint VhostUserEndpoint
Expand All @@ -509,10 +509,10 @@ func (n *NetworkNamespace) UnmarshalJSON(b []byte) error {
}

endpoints = append(endpoints, &endpoint)
virtLog.Infof("VhostUser endpoint unmarshalled [%v]", endpoint)
networkLogger().Infof("VhostUser endpoint unmarshalled [%v]", endpoint)

default:
virtLog.Errorf("Unknown endpoint type received %s\n", e.Type)
networkLogger().Errorf("Unknown endpoint type received %s\n", e.Type)
}
}

Expand Down Expand Up @@ -1010,7 +1010,7 @@ func untapNetworkPair(netPair NetworkInterfacePair) error {
vethLink, err := getLinkByName(netHandle, netPair.VirtIface.Name, &netlink.Veth{})
if err != nil {
// The veth pair is not totally managed by virtcontainers
virtLog.Warnf("Could not get veth interface %s: %s", netPair.VirtIface.Name, err)
networkLogger().Warnf("Could not get veth interface %s: %s", netPair.VirtIface.Name, err)
} else {
if err := netHandle.LinkSetDown(vethLink); err != nil {
return fmt.Errorf("Could not disable veth %s: %s", netPair.VirtIface.Name, err)
Expand Down Expand Up @@ -1062,7 +1062,7 @@ func unBridgeNetworkPair(netPair NetworkInterfacePair) error {
vethLink, err := getLinkByName(netHandle, netPair.VirtIface.Name, &netlink.Veth{})
if err != nil {
// The veth pair is not totally managed by virtcontainers
virtLog.WithError(err).Warn("Could not get veth interface")
networkLogger().WithError(err).Warn("Could not get veth interface")
} else {
if err := netHandle.LinkSetDown(vethLink); err != nil {
return fmt.Errorf("Could not disable veth %s: %s", netPair.VirtIface.Name, err)
Expand Down

0 comments on commit a0be57f

Please sign in to comment.