Individual callstacks are removed from the logger

This commit is contained in:
Michael 2023-10-18 19:55:15 +00:00
parent d05fbe6e45
commit e4a37f344e
36 changed files with 66 additions and 86 deletions

View file

@ -22,7 +22,6 @@
namespace Friendica\Network\Factory;
use Friendica\BaseFactory;
use Friendica\Core\System;
use Friendica\Network\Entity;
/**
@ -43,7 +42,7 @@ class MimeType extends BaseFactory
$filetype = strtolower($types[0]);
$subtype = strtolower($types[1]);
} else {
$this->logger->notice('Unknown MimeType', ['type' => $contentType, 'callstack' => System::callstack(10)]);
$this->logger->notice('Unknown MimeType', ['type' => $contentType]);
}
$parameters = [];

View file

@ -74,17 +74,17 @@ class HttpClient implements ICanSendHttpRequests
}
if(!filter_var($host, FILTER_VALIDATE_IP) && !@dns_get_record($host . '.', DNS_A + DNS_AAAA)) {
$this->logger->debug('URL cannot be resolved.', ['url' => $url, 'callstack' => System::callstack(20)]);
$this->logger->debug('URL cannot be resolved.', ['url' => $url]);
$this->profiler->stopRecording();
return CurlResult::createErrorCurl($this->logger, $url);
}
if (Network::isLocalLink($url)) {
$this->logger->info('Local link', ['url' => $url, 'callstack' => System::callstack(20)]);
$this->logger->info('Local link', ['url' => $url]);
}
if (strlen($url) > 1000) {
$this->logger->debug('URL is longer than 1000 characters.', ['url' => $url, 'callstack' => System::callstack(20)]);
$this->logger->debug('URL is longer than 1000 characters.', ['url' => $url]);
$this->profiler->stopRecording();
return CurlResult::createErrorCurl($this->logger, substr($url, 0, 200));
}
@ -160,7 +160,7 @@ class HttpClient implements ICanSendHttpRequests
};
if (empty($conf[HttpClientOptions::HEADERS]['Accept']) && in_array($method, ['get', 'head'])) {
$this->logger->info('Accept header was missing, using default.', ['url' => $url, 'callstack' => System::callstack()]);
$this->logger->info('Accept header was missing, using default.', ['url' => $url]);
$conf[HttpClientOptions::HEADERS]['Accept'] = HttpClientAccept::DEFAULT;
}
@ -238,7 +238,7 @@ class HttpClient implements ICanSendHttpRequests
$this->profiler->startRecording('network');
if (Network::isLocalLink($url)) {
$this->logger->debug('Local link', ['url' => $url, 'callstack' => System::callstack(20)]);
$this->logger->debug('Local link', ['url' => $url]);
}
if (Network::isUrlBlocked($url)) {

View file

@ -27,7 +27,6 @@ use Exception;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
@ -219,7 +218,7 @@ class Probe
$xrd_timeout = DI::config()->get('system', 'xrd_timeout', 20);
Logger::info('Probing', ['host' => $host, 'ssl_url' => $ssl_url, 'url' => $url, 'callstack' => System::callstack(20)]);
Logger::info('Probing', ['host' => $host, 'ssl_url' => $ssl_url, 'url' => $url]);
$xrd = null;
$curlResult = DI::httpClient()->get($ssl_url, HttpClientAccept::XRD_XML, [HttpClientOptions::TIMEOUT => $xrd_timeout]);