namespace Friendica\Network;
use Friendica\Core\Logger;
+use Friendica\Core\System;
use Friendica\Network\HTTPException\InternalServerErrorException;
use Friendica\Util\Network;
$this->errorNumber = $errorNumber;
$this->error = $error;
- Logger::log($url . ': ' . $this->returnCode . " " . $result, Logger::DATA);
+ Logger::debug('construct', ['url' => $url, 'returncode' => $this->returnCode, 'result' => $result]);
$this->parseBodyHeader($result);
$this->checkSuccess();
}
if (!$this->isSuccess) {
- Logger::log('error: ' . $this->url . ': ' . $this->returnCode . ' - ' . $this->error, Logger::INFO);
- Logger::log('debug: ' . print_r($this->info, true), Logger::DATA);
+ Logger::notice('http error', ['url' => $this->url, 'code' => $this->returnCode, 'error' => $this->error, 'callstack' => System::callstack(20)]);
+ Logger::debug('debug', ['info' => $this->info]);
}
if (!$this->isSuccess && $this->errorNumber == CURLE_OPERATION_TIMEDOUT) {