[VOL-3199] Added support for dynamic enable/disable of Trace Publishing

Change-Id: I920b2964c89ad823985da29d7f8279689a62d3b6
diff --git a/rw_core/core/device/agent.go b/rw_core/core/device/agent.go
index ebfb641..b6bd0ec 100755
--- a/rw_core/core/device/agent.go
+++ b/rw_core/core/device/agent.go
@@ -671,7 +671,7 @@
 	agent.requestQueue.RequestComplete()
 
 	if err := agent.deviceMgr.processTransition(log.WithSpanFromContext(context.Background(), ctx), device, previousState); err != nil {
-		log.Errorw("failed-process-transition", log.Fields{"device-id": device.Id, "previousAdminState": previousState.Admin, "currentAdminState": device.AdminState})
+		logger.Errorw(ctx, "failed-process-transition", log.Fields{"device-id": device.Id, "previousAdminState": previousState.Admin, "currentAdminState": device.AdminState})
 	}
 	return nil
 }