mirror of
https://github.com/friendica/friendica
synced 2025-05-09 09:44:10 +02:00
Log function
implement log() function.
This commit is contained in:
parent
d6d593d724
commit
14fde5dc9b
122 changed files with 1280 additions and 1161 deletions
|
@ -5,6 +5,7 @@
|
|||
namespace Friendica\Util;
|
||||
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\Logger;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
|
@ -33,7 +34,7 @@ class JsonLD
|
|||
}
|
||||
|
||||
if ($recursion > 5) {
|
||||
logger('jsonld bomb detected at: ' . $url);
|
||||
Logger::log('jsonld bomb detected at: ' . $url);
|
||||
exit();
|
||||
}
|
||||
|
||||
|
@ -65,7 +66,7 @@ class JsonLD
|
|||
}
|
||||
catch (Exception $e) {
|
||||
$normalized = false;
|
||||
logger('normalise error:' . print_r($e, true), LOGGER_DEBUG);
|
||||
Logger::log('normalise error:' . print_r($e, true), LOGGER_DEBUG);
|
||||
}
|
||||
|
||||
return $normalized;
|
||||
|
@ -98,7 +99,7 @@ class JsonLD
|
|||
}
|
||||
catch (Exception $e) {
|
||||
$compacted = false;
|
||||
logger('compacting error:' . print_r($e, true), LOGGER_DEBUG);
|
||||
Logger::log('compacting error:' . print_r($e, true), LOGGER_DEBUG);
|
||||
}
|
||||
|
||||
return json_decode(json_encode($compacted, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue