diff --git a/rw_core/mocks/adapter.go b/rw_core/mocks/adapter.go
index 7509f1f..ccbeea4 100644
--- a/rw_core/mocks/adapter.go
+++ b/rw_core/mocks/adapter.go
@@ -17,6 +17,7 @@
 package mocks
 
 import (
+	"context"
 	"fmt"
 	"strconv"
 	"strings"
@@ -81,72 +82,72 @@
 }
 
 // Adapter_descriptor -
-func (ta *Adapter) Adapter_descriptor() error { // nolint
+func (ta *Adapter) Adapter_descriptor(ctx context.Context) error { // nolint
 	return nil
 }
 
 // Device_types -
-func (ta *Adapter) Device_types() (*voltha.DeviceTypes, error) { // nolint
+func (ta *Adapter) Device_types(ctx context.Context) (*voltha.DeviceTypes, error) { // nolint
 	return nil, nil
 }
 
 // Health -
-func (ta *Adapter) Health() (*voltha.HealthStatus, error) {
+func (ta *Adapter) Health(ctx context.Context) (*voltha.HealthStatus, error) {
 	return nil, nil
 }
 
 // Adopt_device -
-func (ta *Adapter) Adopt_device(device *voltha.Device) error { // nolint
+func (ta *Adapter) Adopt_device(ctx context.Context, device *voltha.Device) error { // nolint
 	return nil
 }
 
 // Reconcile_device -
-func (ta *Adapter) Reconcile_device(device *voltha.Device) error { // nolint
+func (ta *Adapter) Reconcile_device(ctx context.Context, device *voltha.Device) error { // nolint
 	return nil
 }
 
 // Abandon_device -
-func (ta *Adapter) Abandon_device(device *voltha.Device) error { // nolint
+func (ta *Adapter) Abandon_device(ctx context.Context, device *voltha.Device) error { // nolint
 	return nil
 }
 
 // Disable_device -
-func (ta *Adapter) Disable_device(device *voltha.Device) error { // nolint
+func (ta *Adapter) Disable_device(ctx context.Context, device *voltha.Device) error { // nolint
 	return nil
 }
 
 // Reenable_device -
-func (ta *Adapter) Reenable_device(device *voltha.Device) error { // nolint
+func (ta *Adapter) Reenable_device(ctx context.Context, device *voltha.Device) error { // nolint
 	return nil
 }
 
 // Reboot_device -
-func (ta *Adapter) Reboot_device(device *voltha.Device) error { // nolint
+func (ta *Adapter) Reboot_device(ctx context.Context, device *voltha.Device) error { // nolint
 	return nil
 }
 
 // Self_test_device -
-func (ta *Adapter) Self_test_device(device *voltha.Device) error { // nolint
+func (ta *Adapter) Self_test_device(ctx context.Context, device *voltha.Device) error { // nolint
 	return nil
 }
 
 // Delete_device -
-func (ta *Adapter) Delete_device(device *voltha.Device) error { // nolint
+func (ta *Adapter) Delete_device(ctx context.Context, device *voltha.Device) error { // nolint
 	return nil
 }
 
 // Get_device_details -
-func (ta *Adapter) Get_device_details(device *voltha.Device) error { // nolint
+func (ta *Adapter) Get_device_details(ctx context.Context, device *voltha.Device) error { // nolint
 	return nil
 }
 
 // Update_flows_bulk -
-func (ta *Adapter) Update_flows_bulk(device *voltha.Device, flows *voltha.Flows, groups *voltha.FlowGroups, flowMetadata *voltha.FlowMetadata) error { // nolint
+func (ta *Adapter) Update_flows_bulk(ctx context.Context, device *voltha.Device, flows *voltha.Flows, groups *voltha.FlowGroups, flowMetadata *voltha.FlowMetadata) error { // nolint
 	return nil
 }
 
 // Update_flows_incrementally mocks the incremental flow update
-func (ta *Adapter) Update_flows_incrementally(device *voltha.Device, flows *of.FlowChanges, groups *of.FlowGroupChanges, flowMetadata *voltha.FlowMetadata) error { // nolint
+func (ta *Adapter) Update_flows_incrementally(ctx context.Context, device *voltha.Device, flows *of.FlowChanges, groups *of.FlowGroupChanges, flowMetadata *voltha.FlowMetadata) error { // nolint
 	ta.flowLock.Lock()
 	defer ta.flowLock.Unlock()
 
@@ -170,27 +171,27 @@
 }
 
 // Update_pm_config -
-func (ta *Adapter) Update_pm_config(device *voltha.Device, pmConfigs *voltha.PmConfigs) error { // nolint
+func (ta *Adapter) Update_pm_config(ctx context.Context, device *voltha.Device, pmConfigs *voltha.PmConfigs) error { // nolint
 	return nil
 }
 
 // Receive_packet_out -
-func (ta *Adapter) Receive_packet_out(deviceID string, egressPortNo int, msg *of.OfpPacketOut) error { // nolint
+func (ta *Adapter) Receive_packet_out(ctx context.Context, deviceID string, egressPortNo int, msg *of.OfpPacketOut) error { // nolint
 	return nil
 }
 
 // Suppress_event -
-func (ta *Adapter) Suppress_event(filter *voltha.EventFilter) error { // nolint
+func (ta *Adapter) Suppress_event(ctx context.Context, filter *voltha.EventFilter) error { // nolint
 	return nil
 }
 
 // Unsuppress_event -
-func (ta *Adapter) Unsuppress_event(filter *voltha.EventFilter) error { // nolint
+func (ta *Adapter) Unsuppress_event(ctx context.Context, filter *voltha.EventFilter) error { // nolint
 	return nil
 }
 
 // Get_ofp_device_info -
-func (ta *Adapter) Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error) { // nolint
+func (ta *Adapter) Get_ofp_device_info(ctx context.Context, device *voltha.Device) (*ic.SwitchCapability, error) { // nolint
 	return &ic.SwitchCapability{
 		Desc: &of.OfpDesc{
 			HwDesc:    "adapter_mock",
@@ -209,56 +210,56 @@
 }
 
 // Process_inter_adapter_message -
-func (ta *Adapter) Process_inter_adapter_message(msg *ic.InterAdapterMessage) error { // nolint
+func (ta *Adapter) Process_inter_adapter_message(ctx context.Context, msg *ic.InterAdapterMessage) error { // nolint
 	return nil
 }
 
 // Download_image -
-func (ta *Adapter) Download_image(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { // nolint
+func (ta *Adapter) Download_image(ctx context.Context, device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { // nolint
 	return nil, nil
 }
 
 // Get_image_download_status -
-func (ta *Adapter) Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { // nolint
+func (ta *Adapter) Get_image_download_status(ctx context.Context, device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { // nolint
 	return nil, nil
 }
 
 // Cancel_image_download -
-func (ta *Adapter) Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { // nolint
+func (ta *Adapter) Cancel_image_download(ctx context.Context, device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { // nolint
 	return nil, nil
 }
 
 // Activate_image_update -
-func (ta *Adapter) Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { // nolint
+func (ta *Adapter) Activate_image_update(ctx context.Context, device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { // nolint
 	return nil, nil
 }
 
 // Revert_image_update -
-func (ta *Adapter) Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { // nolint
+func (ta *Adapter) Revert_image_update(ctx context.Context, device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { // nolint
 	return nil, nil
 }
 
 // Enable_port -
-func (ta *Adapter) Enable_port(deviceId string, port *voltha.Port) error { //nolint
+func (ta *Adapter) Enable_port(ctx context.Context, deviceId string, port *voltha.Port) error { //nolint
 	return nil
 }
 
 // Disable_port -
-func (ta *Adapter) Disable_port(deviceId string, port *voltha.Port) error { //nolint
+func (ta *Adapter) Disable_port(ctx context.Context, deviceId string, port *voltha.Port) error { //nolint
 	return nil
 }
 
 // Child_device_lost -
-func (ta *Adapter) Child_device_lost(pDeviceID string, pPortNo uint32, onuID uint32) error { //nolint
+func (ta *Adapter) Child_device_lost(ctx context.Context, pDeviceID string, pPortNo uint32, onuID uint32) error { //nolint
 	return nil
 }
 
 // Start_omci_test
-func (ta *Adapter) Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*voltha.TestResponse, error) { //nolint
+func (ta *Adapter) Start_omci_test(ctx context.Context, device *voltha.Device, request *voltha.OmciTestRequest) (*voltha.TestResponse, error) { //nolint
 	return nil, nil
 }
 
-func (ta *Adapter) Get_ext_value(deviceId string, device *voltha.Device, valueflag voltha.ValueType_Type) (*voltha.ReturnValues, error) { //nolint
+func (ta *Adapter) Get_ext_value(ctx context.Context, deviceId string, device *voltha.Device, valueflag voltha.ValueType_Type) (*voltha.ReturnValues, error) { //nolint
 	return nil, nil
 }
 
diff --git a/rw_core/mocks/adapter_olt.go b/rw_core/mocks/adapter_olt.go
index c567e40..d040f64 100644
--- a/rw_core/mocks/adapter_olt.go
+++ b/rw_core/mocks/adapter_olt.go
@@ -41,14 +41,14 @@
 }
 
 // NewOLTAdapter - creates OLT adapter instance
-func NewOLTAdapter(cp adapterif.CoreProxy) *OLTAdapter {
+func NewOLTAdapter(ctx context.Context, cp adapterif.CoreProxy) *OLTAdapter {
 	return &OLTAdapter{
 		Adapter: NewAdapter(cp),
 	}
 }
 
 // Adopt_device creates new handler for added device
-func (oltA *OLTAdapter) Adopt_device(device *voltha.Device) error { // nolint
+func (oltA *OLTAdapter) Adopt_device(ctx context.Context, device *voltha.Device) error { // nolint
 	go func() {
 		d := proto.Clone(device).(*voltha.Device)
 		d.Root = true
@@ -58,7 +58,7 @@
 		d.MacAddress = strings.ToUpper(com.GetRandomMacAddress())
 		oltA.storeDevice(d)
 		if res := oltA.coreProxy.DeviceUpdate(context.TODO(), d); res != nil {
-			logger.Fatalf("deviceUpdate-failed-%s", res)
+			logger.Fatalf(ctx, "deviceUpdate-failed-%s", res)
 		}
 		capability := uint32(of.OfpPortFeatures_OFPPF_1GB_FD | of.OfpPortFeatures_OFPPF_FIBER)
 		nniPort := &voltha.Port{
@@ -79,7 +79,7 @@
 		}
 		var err error
 		if err = oltA.coreProxy.PortCreated(context.TODO(), d.Id, nniPort); err != nil {
-			logger.Fatalf("PortCreated-failed-%s", err)
+			logger.Fatalf(ctx, "PortCreated-failed-%s", err)
 		}
 
 		ponPort := &voltha.Port{
@@ -89,19 +89,19 @@
 			OperStatus: voltha.OperStatus_ACTIVE,
 		}
 		if err = oltA.coreProxy.PortCreated(context.TODO(), d.Id, ponPort); err != nil {
-			logger.Fatalf("PortCreated-failed-%s", err)
+			logger.Fatalf(ctx, "PortCreated-failed-%s", err)
 		}
 
 		d.ConnectStatus = voltha.ConnectStatus_REACHABLE
 		d.OperStatus = voltha.OperStatus_ACTIVE
 
 		if err = oltA.coreProxy.DeviceStateUpdate(context.TODO(), d.Id, d.ConnectStatus, d.OperStatus); err != nil {
-			logger.Fatalf("Device-state-update-failed-%s", err)
+			logger.Fatalf(ctx, "Device-state-update-failed-%s", err)
 		}
 
 		//Get the latest device data from the Core
 		if d, err = oltA.coreProxy.GetDevice(context.TODO(), d.Id, d.Id); err != nil {
-			logger.Fatalf("getting-device-failed-%s", err)
+			logger.Fatalf(ctx, "getting-device-failed-%s", err)
 		}
 
 		oltA.updateDevice(d)
@@ -119,7 +119,7 @@
 					"onu_adapter_mock",
 					com.GetRandomSerialNumber(),
 					int64(seqNo)); err != nil {
-					logger.Fatalf("failure-sending-child-device-%s", err)
+					logger.Fatalf(ctx, "failure-sending-child-device-%s", err)
 				}
 			}(i)
 		}
@@ -128,9 +128,9 @@
 }
 
 // Get_ofp_device_info returns ofp device info
-func (oltA *OLTAdapter) Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error) { // nolint
+func (oltA *OLTAdapter) Get_ofp_device_info(ctx context.Context, device *voltha.Device) (*ic.SwitchCapability, error) { // nolint
 	if d := oltA.getDevice(device.Id); d == nil {
-		logger.Fatalf("device-not-found-%s", device.Id)
+		logger.Fatalf(ctx, "device-not-found-%s", device.Id)
 	}
 	return &ic.SwitchCapability{
 		Desc: &of.OfpDesc{
@@ -160,16 +160,16 @@
 }
 
 // Disable_device disables device
-func (oltA *OLTAdapter) Disable_device(device *voltha.Device) error { // nolint
+func (oltA *OLTAdapter) Disable_device(ctx context.Context, device *voltha.Device) error { // nolint
 	go func() {
 		if d := oltA.getDevice(device.Id); d == nil {
-			logger.Fatalf("device-not-found-%s", device.Id)
+			logger.Fatalf(ctx, "device-not-found-%s", device.Id)
 		}
 
 		cloned := proto.Clone(device).(*voltha.Device)
 		// Update the all ports state on that device to disable
 		if err := oltA.coreProxy.PortsStateUpdate(context.TODO(), cloned.Id, voltha.OperStatus_UNKNOWN); err != nil {
-			logger.Warnw("updating-ports-failed", log.Fields{"deviceId": device.Id, "error": err})
+			logger.Warnw(ctx, "updating-ports-failed", log.Fields{"deviceId": device.Id, "error": err})
 		}
 
 		//Update the device operational state
@@ -178,7 +178,7 @@
 
 		if err := oltA.coreProxy.DeviceStateUpdate(context.TODO(), cloned.Id, cloned.ConnectStatus, cloned.OperStatus); err != nil {
 			// Device may already have been deleted in the core
-			logger.Warnw("device-state-update-failed", log.Fields{"deviceId": device.Id, "error": err})
+			logger.Warnw(ctx, "device-state-update-failed", log.Fields{"deviceId": device.Id, "error": err})
 			return
 		}
 
@@ -187,47 +187,47 @@
 		// Tell the Core that all child devices have been disabled (by default it's an action already taken by the Core
 		if err := oltA.coreProxy.ChildDevicesLost(context.TODO(), cloned.Id); err != nil {
 			// Device may already have been deleted in the core
-			logger.Warnw("lost-notif-of-child-devices-failed", log.Fields{"deviceId": device.Id, "error": err})
+			logger.Warnw(ctx, "lost-notif-of-child-devices-failed", log.Fields{"deviceId": device.Id, "error": err})
 		}
 	}()
 	return nil
 }
 
 // Reenable_device reenables device
-func (oltA *OLTAdapter) Reenable_device(device *voltha.Device) error { // nolint
+func (oltA *OLTAdapter) Reenable_device(ctx context.Context, device *voltha.Device) error { // nolint
 	go func() {
 		if d := oltA.getDevice(device.Id); d == nil {
-			logger.Fatalf("device-not-found-%s", device.Id)
+			logger.Fatalf(ctx, "device-not-found-%s", device.Id)
 		}
 
 		cloned := proto.Clone(device).(*voltha.Device)
 		// Update the all ports state on that device to enable
 		if err := oltA.coreProxy.PortsStateUpdate(context.TODO(), cloned.Id, voltha.OperStatus_ACTIVE); err != nil {
-			logger.Fatalf("updating-ports-failed", log.Fields{"deviceId": device.Id, "error": err})
+			logger.Fatalf(ctx, "updating-ports-failed", log.Fields{"deviceId": device.Id, "error": err})
 		}
 
 		//Update the device state
 		cloned.OperStatus = voltha.OperStatus_ACTIVE
 
 		if err := oltA.coreProxy.DeviceStateUpdate(context.TODO(), cloned.Id, cloned.ConnectStatus, cloned.OperStatus); err != nil {
-			logger.Fatalf("device-state-update-failed", log.Fields{"deviceId": device.Id, "error": err})
+			logger.Fatalf(ctx, "device-state-update-failed", log.Fields{"deviceId": device.Id, "error": err})
 		}
 
 		// Tell the Core that all child devices have been enabled
 		if err := oltA.coreProxy.ChildDevicesDetected(context.TODO(), cloned.Id); err != nil {
-			logger.Fatalf("detection-notif-of-child-devices-failed", log.Fields{"deviceId": device.Id, "error": err})
+			logger.Fatalf(ctx, "detection-notif-of-child-devices-failed", log.Fields{"deviceId": device.Id, "error": err})
 		}
 	}()
 	return nil
 }
 
 // Enable_port -
-func (oltA *OLTAdapter) Enable_port(deviceId string, Port *voltha.Port) error { //nolint
+func (oltA *OLTAdapter) Enable_port(ctx context.Context, deviceId string, Port *voltha.Port) error { //nolint
 	go func() {
 
 		if Port.Type == voltha.Port_PON_OLT {
 			if err := oltA.coreProxy.PortStateUpdate(context.TODO(), deviceId, voltha.Port_PON_OLT, Port.PortNo, voltha.OperStatus_ACTIVE); err != nil {
-				logger.Fatalf("updating-ports-failed", log.Fields{"device-id": deviceId, "error": err})
+				logger.Fatalf(ctx, "updating-ports-failed", log.Fields{"device-id": deviceId, "error": err})
 			}
 		}
 
@@ -236,13 +236,13 @@
 }
 
 // Disable_port -
-func (oltA *OLTAdapter) Disable_port(deviceId string, Port *voltha.Port) error { //nolint
+func (oltA *OLTAdapter) Disable_port(ctx context.Context, deviceId string, Port *voltha.Port) error { //nolint
 	go func() {
 
 		if Port.Type == voltha.Port_PON_OLT {
 			if err := oltA.coreProxy.PortStateUpdate(context.TODO(), deviceId, voltha.Port_PON_OLT, Port.PortNo, voltha.OperStatus_DISCOVERED); err != nil {
 				// Corresponding device may have been deleted
-				logger.Warnw("updating-ports-failed", log.Fields{"device-id": deviceId, "error": err})
+				logger.Warnw(ctx, "updating-ports-failed", log.Fields{"device-id": deviceId, "error": err})
 			}
 		}
 	}()
@@ -250,33 +250,33 @@
 }
 
 // Child_device_lost deletes ONU and its references
-func (oltA *OLTAdapter) Child_device_lost(deviceID string, pPortNo uint32, onuID uint32) error { // nolint
+func (oltA *OLTAdapter) Child_device_lost(ctx context.Context, deviceID string, pPortNo uint32, onuID uint32) error { // nolint
 	return nil
 }
 
 // Reboot_device -
-func (oltA *OLTAdapter) Reboot_device(device *voltha.Device) error { // nolint
-	logger.Infow("reboot-device", log.Fields{"deviceId": device.Id})
+func (oltA *OLTAdapter) Reboot_device(ctx context.Context, device *voltha.Device) error { // nolint
+	logger.Infow(ctx, "reboot-device", log.Fields{"deviceId": device.Id})
 
 	go func() {
 		if err := oltA.coreProxy.DeviceStateUpdate(context.TODO(), device.Id, voltha.ConnectStatus_UNREACHABLE, voltha.OperStatus_UNKNOWN); err != nil {
-			logger.Fatalf("device-state-update-failed", log.Fields{"device-id": device.Id, "error": err})
+			logger.Fatalf(ctx, "device-state-update-failed", log.Fields{"device-id": device.Id, "error": err})
 		}
 		if err := oltA.coreProxy.PortsStateUpdate(context.TODO(), device.Id, voltha.OperStatus_UNKNOWN); err != nil {
 			// Not an error as the previous command will start the process of clearing the OLT
-			logger.Infow("port-update-failed", log.Fields{"device-id": device.Id, "error": err})
+			logger.Infow(ctx, "port-update-failed", log.Fields{"device-id": device.Id, "error": err})
 		}
 	}()
 	return nil
 }
 
 // TODO: REMOVE Start_omci_test begins an omci self-test
-func (oltA *OLTAdapter) Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*ic.TestResponse, error) { // nolint
+func (oltA *OLTAdapter) Start_omci_test(ctx context.Context, device *voltha.Device, request *voltha.OmciTestRequest) (*ic.TestResponse, error) { // nolint
 	_ = device
 	return nil, errors.New("start-omci-test-not-implemented")
 }
 
-func (oltA *OLTAdapter) Get_ext_value(deviceId string, device *voltha.Device, valueflag voltha.ValueType_Type) (*voltha.ReturnValues, error) { // nolint
+func (oltA *OLTAdapter) Get_ext_value(ctx context.Context, deviceId string, device *voltha.Device, valueflag voltha.ValueType_Type) (*voltha.ReturnValues, error) { // nolint
 	_ = deviceId
 	_ = device
 	_ = valueflag
diff --git a/rw_core/mocks/adapter_olt_test.go b/rw_core/mocks/adapter_olt_test.go
index 036d612..082c12e 100644
--- a/rw_core/mocks/adapter_olt_test.go
+++ b/rw_core/mocks/adapter_olt_test.go
@@ -17,13 +17,14 @@
 package mocks
 
 import (
+	"context"
 	"testing"
 
 	"github.com/opencord/voltha-lib-go/v3/pkg/adapters"
 )
 
 func TestOLTAdapterImplementsIAdapter(t *testing.T) {
-	adapter := NewOLTAdapter(nil)
+	adapter := NewOLTAdapter(context.Background(), nil)
 
 	if _, ok := interface{}(adapter).(adapters.IAdapter); !ok {
 		t.Error("OLT adapter does not implement voltha-lib-go/v2/pkg/adapters/IAdapter interface")
diff --git a/rw_core/mocks/adapter_onu.go b/rw_core/mocks/adapter_onu.go
index 02c885e..8e7b867 100644
--- a/rw_core/mocks/adapter_onu.go
+++ b/rw_core/mocks/adapter_onu.go
@@ -36,14 +36,14 @@
 }
 
 // NewONUAdapter creates ONU adapter
-func NewONUAdapter(cp adapterif.CoreProxy) *ONUAdapter {
+func NewONUAdapter(ctx context.Context, cp adapterif.CoreProxy) *ONUAdapter {
 	return &ONUAdapter{
 		Adapter: NewAdapter(cp),
 	}
 }
 
 // Adopt_device creates new handler for added device
-func (onuA *ONUAdapter) Adopt_device(device *voltha.Device) error { // nolint
+func (onuA *ONUAdapter) Adopt_device(ctx context.Context, device *voltha.Device) error { // nolint
 	go func() {
 		d := proto.Clone(device).(*voltha.Device)
 		d.Root = false
@@ -53,14 +53,14 @@
 		d.MacAddress = strings.ToUpper(com.GetRandomMacAddress())
 		onuA.storeDevice(d)
 		if res := onuA.coreProxy.DeviceUpdate(context.TODO(), d); res != nil {
-			logger.Fatalf("deviceUpdate-failed-%s", res)
+			logger.Fatalf(ctx, "deviceUpdate-failed-%s", res)
 		}
 
 		d.ConnectStatus = voltha.ConnectStatus_REACHABLE
 		d.OperStatus = voltha.OperStatus_DISCOVERED
 
 		if err := onuA.coreProxy.DeviceStateUpdate(context.TODO(), d.Id, d.ConnectStatus, d.OperStatus); err != nil {
-			logger.Fatalf("device-state-update-failed-%s", err)
+			logger.Fatalf(ctx, "device-state-update-failed-%s", err)
 		}
 
 		uniPortNo := uint32(2)
@@ -90,7 +90,7 @@
 
 		var err error
 		if err = onuA.coreProxy.PortCreated(context.TODO(), d.Id, uniPort); err != nil {
-			logger.Fatalf("PortCreated-failed-%s", err)
+			logger.Fatalf(ctx, "PortCreated-failed-%s", err)
 		}
 
 		ponPortNo := uint32(1)
@@ -107,18 +107,18 @@
 				PortNo: device.ParentPortNo}}, // Peer port is parent's port number
 		}
 		if err = onuA.coreProxy.PortCreated(context.TODO(), d.Id, ponPort); err != nil {
-			logger.Fatalf("PortCreated-failed-%s", err)
+			logger.Fatalf(ctx, "PortCreated-failed-%s", err)
 		}
 
 		d.ConnectStatus = voltha.ConnectStatus_REACHABLE
 		d.OperStatus = voltha.OperStatus_ACTIVE
 
 		if err = onuA.coreProxy.DeviceStateUpdate(context.TODO(), d.Id, d.ConnectStatus, d.OperStatus); err != nil {
-			logger.Fatalf("device-state-update-failed-%s", err)
+			logger.Fatalf(ctx, "device-state-update-failed-%s", err)
 		}
 		//Get the latest device data from the Core
 		if d, err = onuA.coreProxy.GetDevice(context.TODO(), d.Id, d.Id); err != nil {
-			logger.Fatalf("getting-device-failed-%s", err)
+			logger.Fatalf(ctx, "getting-device-failed-%s", err)
 		}
 
 		onuA.updateDevice(d)
@@ -127,16 +127,16 @@
 }
 
 // Disable_device disables device
-func (onuA *ONUAdapter) Disable_device(device *voltha.Device) error { // nolint
+func (onuA *ONUAdapter) Disable_device(ctx context.Context, device *voltha.Device) error { // nolint
 	go func() {
 		if d := onuA.getDevice(device.Id); d == nil {
-			logger.Fatalf("device-not-found-%s", device.Id)
+			logger.Fatalf(ctx, "device-not-found-%s", device.Id)
 		}
 		cloned := proto.Clone(device).(*voltha.Device)
 		// Update the all ports state on that device to disable
 		if err := onuA.coreProxy.PortsStateUpdate(context.TODO(), cloned.Id, voltha.OperStatus_UNKNOWN); err != nil {
 			// Device may also have been deleted in the Core
-			logger.Warnw("updating-ports-failed", log.Fields{"deviceId": device.Id, "error": err})
+			logger.Warnw(ctx, "updating-ports-failed", log.Fields{"deviceId": device.Id, "error": err})
 			return
 		}
 		//Update the device state
@@ -144,7 +144,7 @@
 		cloned.OperStatus = voltha.OperStatus_UNKNOWN
 
 		if err := onuA.coreProxy.DeviceStateUpdate(context.TODO(), cloned.Id, cloned.ConnectStatus, cloned.OperStatus); err != nil {
-			logger.Warnw("device-state-update-failed", log.Fields{"deviceId": device.Id, "error": err})
+			logger.Warnw(ctx, "device-state-update-failed", log.Fields{"deviceId": device.Id, "error": err})
 			return
 		}
 		onuA.updateDevice(cloned)
@@ -153,16 +153,16 @@
 }
 
 // Reenable_device reenables device
-func (onuA *ONUAdapter) Reenable_device(device *voltha.Device) error { // nolint
+func (onuA *ONUAdapter) Reenable_device(ctx context.Context, device *voltha.Device) error { // nolint
 	go func() {
 		if d := onuA.getDevice(device.Id); d == nil {
-			logger.Fatalf("device-not-found-%s", device.Id)
+			logger.Fatalf(ctx, "device-not-found-%s", device.Id)
 		}
 
 		cloned := proto.Clone(device).(*voltha.Device)
 		// Update the all ports state on that device to enable
 		if err := onuA.coreProxy.PortsStateUpdate(context.TODO(), cloned.Id, voltha.OperStatus_ACTIVE); err != nil {
-			logger.Fatalf("updating-ports-failed", log.Fields{"deviceId": device.Id, "error": err})
+			logger.Fatalf(ctx, "updating-ports-failed", log.Fields{"deviceId": device.Id, "error": err})
 		}
 
 		//Update the device state
@@ -170,7 +170,7 @@
 		cloned.OperStatus = voltha.OperStatus_ACTIVE
 
 		if err := onuA.coreProxy.DeviceStateUpdate(context.TODO(), cloned.Id, cloned.ConnectStatus, cloned.OperStatus); err != nil {
-			logger.Fatalf("device-state-update-failed", log.Fields{"deviceId": device.Id, "error": err})
+			logger.Fatalf(ctx, "device-state-update-failed", log.Fields{"deviceId": device.Id, "error": err})
 		}
 
 		onuA.updateDevice(cloned)
@@ -179,12 +179,12 @@
 }
 
 // Start_omci_test begins an omci self-test
-func (onuA *ONUAdapter) Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*ic.TestResponse, error) { // nolint
+func (onuA *ONUAdapter) Start_omci_test(ctx context.Context, device *voltha.Device, request *voltha.OmciTestRequest) (*ic.TestResponse, error) { // nolint
 	_ = device
 	return &ic.TestResponse{Result: ic.TestResponse_SUCCESS}, nil
 }
 
-func (onuA *ONUAdapter) Get_ext_value(deviceId string, device *voltha.Device, valueflag voltha.ValueType_Type) (*voltha.ReturnValues, error) { // nolint
+func (onuA *ONUAdapter) Get_ext_value(ctx context.Context, deviceId string, device *voltha.Device, valueflag voltha.ValueType_Type) (*voltha.ReturnValues, error) { // nolint
 	_ = deviceId
 	_ = device
 	_ = valueflag
diff --git a/rw_core/mocks/adapter_onu_test.go b/rw_core/mocks/adapter_onu_test.go
index ff4ed32..6940ee6 100644
--- a/rw_core/mocks/adapter_onu_test.go
+++ b/rw_core/mocks/adapter_onu_test.go
@@ -17,12 +17,13 @@
 package mocks
 
 import (
+	"context"
 	"github.com/opencord/voltha-lib-go/v3/pkg/adapters"
 	"testing"
 )
 
 func TestONUAdapterImplementsIAdapter(t *testing.T) {
-	adapter := NewONUAdapter(nil)
+	adapter := NewONUAdapter(context.Background(), nil)
 
 	if _, ok := interface{}(adapter).(adapters.IAdapter); !ok {
 		t.Error("ONU adapter does not implement voltha-lib-go/v2/pkg/adapters/IAdapter interface")
diff --git a/rw_core/mocks/common.go b/rw_core/mocks/common.go
index 3b2df29..836770c 100644
--- a/rw_core/mocks/common.go
+++ b/rw_core/mocks/common.go
@@ -21,12 +21,12 @@
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 )
 
-var logger log.Logger
+var logger log.CLogger
 
 func init() {
 	// Setup this package so that it's log level can be modified at run time
 	var err error
-	logger, err = log.AddPackage(log.JSON, log.ErrorLevel, log.Fields{"pkg": "mocks"})
+	logger, err = log.RegisterPackage(log.JSON, log.ErrorLevel, log.Fields{"pkg": "mocks"})
 	if err != nil {
 		panic(err)
 	}
