mirror of
https://github.com/friendica/friendica
synced 2025-04-30 09:44:22 +02:00
Individual callstacks are removed from the logger
This commit is contained in:
parent
d05fbe6e45
commit
e4a37f344e
36 changed files with 66 additions and 86 deletions
|
@ -23,7 +23,6 @@ namespace Friendica\Util;
|
|||
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use phpseclib3\Crypt\PublicKeyLoader;
|
||||
|
||||
|
@ -42,7 +41,7 @@ class Crypto
|
|||
public static function rsaSign($data, $key, $alg = 'sha256')
|
||||
{
|
||||
if (empty($key)) {
|
||||
Logger::warning('Empty key parameter', ['callstack' => System::callstack()]);
|
||||
Logger::warning('Empty key parameter');
|
||||
}
|
||||
openssl_sign($data, $sig, $key, (($alg == 'sha1') ? OPENSSL_ALGO_SHA1 : $alg));
|
||||
return $sig;
|
||||
|
@ -58,7 +57,7 @@ class Crypto
|
|||
public static function rsaVerify($data, $sig, $key, $alg = 'sha256')
|
||||
{
|
||||
if (empty($key)) {
|
||||
Logger::warning('Empty key parameter', ['callstack' => System::callstack()]);
|
||||
Logger::warning('Empty key parameter');
|
||||
}
|
||||
return openssl_verify($data, $sig, $key, (($alg == 'sha1') ? OPENSSL_ALGO_SHA1 : $alg));
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ class JsonLD
|
|||
Logger::notice('compacting error', ['msg' => $e->getMessage(), 'previous' => $e->getPrevious(), 'line' => $e->getLine()]);
|
||||
if ($logfailed && DI::config()->get('debug', 'ap_log_failure')) {
|
||||
$tempfile = tempnam(System::getTempPath(), 'failed-jsonld');
|
||||
file_put_contents($tempfile, json_encode(['json' => $orig_json, 'callstack' => System::callstack(20), 'msg' => $e->getMessage(), 'previous' => $e->getPrevious()], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
|
||||
file_put_contents($tempfile, json_encode(['json' => $orig_json, 'msg' => $e->getMessage(), 'previous' => $e->getPrevious()], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
|
||||
Logger::notice('Failed message stored', ['file' => $tempfile]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ class Proxy
|
|||
$size = ':' . $size;
|
||||
}
|
||||
|
||||
Logger::info('Created proxy link', ['url' => $url, 'callstack' => System::callstack(20)]);
|
||||
Logger::info('Created proxy link', ['url' => $url]);
|
||||
|
||||
// Too long files aren't supported by Apache
|
||||
if (strlen($proxypath) > 250) {
|
||||
|
|
|
@ -23,7 +23,6 @@ namespace Friendica\Util;
|
|||
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\System;
|
||||
use ParagonIE\ConstantTime\Base64;
|
||||
|
||||
/**
|
||||
|
@ -511,7 +510,7 @@ class Strings
|
|||
);
|
||||
|
||||
if (is_null($return)) {
|
||||
Logger::notice('Received null value from preg_replace_callback', ['text' => $text, 'regex' => $regex, 'blocks' => $blocks, 'executionId' => $executionId, 'callstack' => System::callstack(10)]);
|
||||
Logger::notice('Received null value from preg_replace_callback', ['text' => $text, 'regex' => $regex, 'blocks' => $blocks, 'executionId' => $executionId]);
|
||||
}
|
||||
|
||||
$text = $callback($return ?? $text) ?? '';
|
||||
|
|
|
@ -26,7 +26,6 @@ use DOMElement;
|
|||
use DOMNode;
|
||||
use DOMXPath;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\System;
|
||||
use SimpleXMLElement;
|
||||
|
||||
/**
|
||||
|
@ -451,7 +450,7 @@ class XML
|
|||
$x = @simplexml_load_string($s);
|
||||
if (!$x) {
|
||||
if (!$suppress_log) {
|
||||
Logger::error('Error(s) while parsing XML string.', ['callstack' => System::callstack()]);
|
||||
Logger::error('Error(s) while parsing XML string.');
|
||||
foreach (libxml_get_errors() as $err) {
|
||||
Logger::info('libxml error', ['code' => $err->code, 'position' => $err->line . ':' . $err->column, 'message' => $err->message]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue