I am trying to decode the JSON in normal string and print that in the info log in Magento 2.4.0 but I am getting nothing in the info log. Adding the code below anyone please suggest a solution for this.
Code I am using
public function execute()
{
$result = $this->resultJsonFactory->create();
$isSuccess = $this->tracking->createApi();
$jsonresponse = json_decode($isSuccess); // decoding here
$this->logger->info(var_dump($jsonresponse)); // trying to print in info log
return $result->setData(['success' => $isSuccess]);
}
$isSuccess - this variable has the below JSON data
Coveolog.INFO: {"sourceType":"PUSH","id":"dsspartnersorggrc3y48w-uk7awlmkozpufpe6pwaeoycmpy","name":"DSS-Coveo_M2-Integration-B2C-product-en_US","sourceVisibility":"SHARED","customParameters":{},"information":{"sourceStatus":{"type":"CREATING","timestamp":1617776580670,"allowedOperations":["DELETE"]},"numberOfDocuments":0,"documentsTotalSize":0},"pushEnabled":true,"onPremisesEnabled":false,"streamEnabled":false,"logicalIndex":"default","preConversionExtensions":[],"postConversionExtensions":[],"permissions":{"permissionLevels":[{"name":"Source Specified Permissions","permissionSets":[{"name":"Shared","permissions":[{"allowed":true,"identityType":"GROUP","identity":"@","securityProvider":"Email Security Provider"}]}]}]},"urlFilters":[{"filter":"*","includeFilter":true,"filterType":"WILDCARD"}],"ocrFileTypes":[],"resourceId":"dsspartnersorggrc3y48w-uk7awlmkozpufpe6pwaeoycmpy"} [] []