X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp.php;h=a708abe649e9f3a0e22c74746a6c2a8a4c430bc5;hb=34521c228bd69609fa4f475bb2e2e826723fcc16;hp=dd54e05eea70660aa3a805574878baeb01f46dc0;hpb=ebbe8f98b7ffb3b68580a351897c0caec1617c75;p=friendica.git diff --git a/src/App.php b/src/App.php index dd54e05eea..a708abe649 100644 --- a/src/App.php +++ b/src/App.php @@ -566,7 +566,7 @@ class App public function runFrontend(App\Router $router, IManagePersonalConfigValues $pconfig, Authentication $auth, App\Page $page, Nav $nav, ModuleHTTPException $httpException, HTTPInputData $httpInput, float $start_time, array $server) { $requeststring = ($_SERVER['REQUEST_METHOD'] ?? '') . ' ' . ($_SERVER['REQUEST_URI'] ?? '') . ' ' . ($_SERVER['SERVER_PROTOCOL'] ?? ''); - $this->logger->debug('Got request', ['address' => $_SERVER['REMOTE_ADDR'] ?? '', 'request' => $requeststring, 'referer' => $_SERVER['HTTP_REFERER'] ?? '', 'user-agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']); + $this->logger->debug('Request received', ['address' => $_SERVER['REMOTE_ADDR'] ?? '', 'request' => $requeststring, 'referer' => $_SERVER['HTTP_REFERER'] ?? '', 'user-agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']); $this->profiler->set($start_time, 'start'); $this->profiler->set(microtime(true), 'classinit'); @@ -715,8 +715,10 @@ class App $response = $page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig, $nav, $this->session->getLocalUserId()); } - $page->exit($response); + $this->logger->debug('Request processed sucessfully', ['response' => $response->getStatusCode(), 'address' => $_SERVER['REMOTE_ADDR'] ?? '', 'request' => $requeststring, 'referer' => $_SERVER['HTTP_REFERER'] ?? '', 'user-agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']); + System::echoResponse($response); } catch (HTTPException $e) { + $this->logger->debug('Request processed with exception', ['response' => $e->getCode(), 'address' => $_SERVER['REMOTE_ADDR'] ?? '', 'request' => $requeststring, 'referer' => $_SERVER['HTTP_REFERER'] ?? '', 'user-agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']); $httpException->rawContent($e); } $page->logRuntime($this->config, 'runFrontend');