]> git.mxchange.org Git - friendica.git/commitdiff
Improve compacting error logging in Util\JsonLD
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 23 Sep 2021 03:09:46 +0000 (23:09 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 23 Sep 2021 03:09:46 +0000 (23:09 -0400)
- Exceptions thrown by friendica/json-ld are nested and their string representation shows all the exception chain

src/Util/JsonLD.php

index f91d84ad5c13cd5e98a39b97db2835baa3ac176f..6ffe9a0a0f6b06dbede9883fe1306020bd63c5bf 100644 (file)
@@ -165,7 +165,7 @@ class JsonLD
                }
                catch (Exception $e) {
                        $compacted = false;
-                       Logger::error('compacting error', ['line' => $e->getLine(), 'message' => $e->getMessage()]);
+                       Logger::notice('compacting error', ['line' => $e->getLine(), 'exception' => $e]);
                }
 
                $json = json_decode(json_encode($compacted, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), true);