X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FJsonLD.php;h=926fa1437d46aa1cb4efac0c8d79fbdaf1527d2d;hb=c07cb2c8f31154cc424e99c95740d753501e09b7;hp=69973f4febf7d95757189a7e36b8a3ffa4c04b10;hpb=87b98b82495e254e7d1ecf84354648d95b8c9b11;p=friendica.git diff --git a/src/Util/JsonLD.php b/src/Util/JsonLD.php index 69973f4feb..926fa1437d 100644 --- a/src/Util/JsonLD.php +++ b/src/Util/JsonLD.php @@ -68,9 +68,16 @@ class JsonLD } catch (Exception $e) { $normalized = false; - Logger::error('normalise error'); - // Sooner or later we should log some details as well - but currently this leads to memory issues - // Logger::log('normalise error:' . substr(print_r($e, true), 0, 10000), Logger::DEBUG); + $messages = []; + $currentException = $e; + do { + $messages[] = $currentException->getMessage(); + } while($currentException = $currentException->getPrevious()); + + Logger::warning('JsonLD normalize error'); + Logger::notice('JsonLD normalize error', ['messages' => $messages]); + Logger::info('JsonLD normalize error', ['trace' => $e->getTraceAsString()]); + Logger::debug('JsonLD normalize error', ['jsonobj' => $jsonobj]); } return $normalized;