Log function

implement log() function.
This commit is contained in:
Adam Magness 2018-10-29 17:20:46 -04:00
parent d6d593d724
commit 14fde5dc9b
122 changed files with 1280 additions and 1161 deletions

View file

@ -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);