X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2FCurlResult.php;h=9f52edfad698137ae06936b80f0e7f7354af2ddd;hb=c947b7f211e2468561a8864b2141dfcbfe65b63b;hp=5b77c3963c7e69e7593107f0c69f8d6d5f2d7877;hpb=0447bb2769648eadd718e3dd9560ce2f480af8d8;p=friendica.git diff --git a/src/Network/CurlResult.php b/src/Network/CurlResult.php index 5b77c3963c..9f52edfad6 100644 --- a/src/Network/CurlResult.php +++ b/src/Network/CurlResult.php @@ -1,8 +1,28 @@ . + * + */ namespace Friendica\Network; use Friendica\Core\Logger; +use Friendica\Core\System; use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Util\Network; @@ -111,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(); @@ -147,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) {