X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2FCurlResult.php;h=017f2c559f944ae10fa500dff30d3fbaaac3131d;hb=befc2af5043a3afde251721c0d27df695db1bb7e;hp=e3cc9f98cd9f7faecd2ac9d8e9c335d2cc3beb02;hpb=23c64b9a119c5df9f985ad4c62ef6fb79d68bee3;p=friendica.git diff --git a/src/Network/CurlResult.php b/src/Network/CurlResult.php index e3cc9f98cd..017f2c559f 100644 --- a/src/Network/CurlResult.php +++ b/src/Network/CurlResult.php @@ -1,5 +1,6 @@ +. * - */ Friendica\Network; + */ + +namespace Friendica\Network; use Friendica\Core\Logger; +use Friendica\Core\System; use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Util\Network; @@ -127,7 +131,7 @@ class CurlResult $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(); @@ -163,8 +167,8 @@ class CurlResult } 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) {