]> git.mxchange.org Git - friendica.git/blobdiff - src/Network/CurlResult.php
"print_r" in logging replaced / obsolete stuff removed
[friendica.git] / src / Network / CurlResult.php
index 44263716bce9cb499be52ddd8b8d0a5b09d3a5e1..9f52edfad698137ae06936b80f0e7f7354af2ddd 100644 (file)
@@ -22,6 +22,7 @@
 namespace Friendica\Network;
 
 use Friendica\Core\Logger;
+use Friendica\Core\System;
 use Friendica\Network\HTTPException\InternalServerErrorException;
 use Friendica\Util\Network;
 
@@ -130,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();
@@ -166,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) {