[VOL-3187]Pass Context down the execution call hierarchy across ofagent codebase
Change-Id: Ia5f2fa1509beefe0ddc427b83e39d2702782db8f
diff --git a/internal/pkg/openflow/packet.go b/internal/pkg/openflow/packet.go
index 9a13de2..dcef5fc 100644
--- a/internal/pkg/openflow/packet.go
+++ b/internal/pkg/openflow/packet.go
@@ -17,16 +17,17 @@
package openflow
import (
+ "context"
"encoding/json"
ofp "github.com/opencord/goloxi/of13"
"github.com/opencord/voltha-lib-go/v3/pkg/log"
"github.com/opencord/voltha-protos/v3/go/voltha"
)
-func (ofc *OFConnection) handlePacketOut(packetOut *ofp.PacketOut) {
+func (ofc *OFConnection) handlePacketOut(ctx context.Context, packetOut *ofp.PacketOut) {
if logger.V(log.DebugLevel) {
js, _ := json.Marshal(packetOut)
- logger.Debugw("handlePacketOut called",
+ logger.Debugw(ctx, "handlePacketOut called",
log.Fields{
"device-id": ofc.DeviceID,
"packet-out": js})
@@ -51,7 +52,7 @@
if logger.V(log.DebugLevel) {
js, _ := json.Marshal(pbPacketOut)
- logger.Debugw("handlePacketOut sending",
+ logger.Debugw(ctx, "handlePacketOut sending",
log.Fields{
"device-id": ofc.DeviceID,
"packet-out": js})