getLogs($txnId); $progress = $hmc->getProgress($txnId); //REZXXX $logs = ''; //REZXXX //REZXXX /* Generate long logs. */ //REZXXX for($i = 0; $i < 100; $i++) { //REZXXX $logs .= "1111
"; //REZXXX } return array ('logs' => $logs['subTxns'], 'progress' => $progress['subTxns']); } $result = fetchTxnLogs($txnId); /* Create the output data... */ $jsonOutput = array( 'clusterName' => $clusterName, 'txnId' => $txnId, 'logs' => $result['logs'], 'progress' => $result['progress']); /* ...and spit it out. */ header("Content-type: application/json"); print (json_encode($jsonOutput)); ?>