public function LoggerDataCollector::collect

Collects data for the given Request and Response.

@api

Parameters

Request $request A Request instance:

Response $response A Response instance:

\Exception $exception An Exception instance:

Overrides DataCollectorInterface::collect

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php, line 38

Class

LoggerDataCollector
LogDataCollector.

Namespace

Symfony\Component\HttpKernel\DataCollector

Code

public function collect(Request $request, Response $response, \Exception $exception = null) {
  if (null !== $this->logger) {
    $this->data = array(
      'error_count' => $this->logger
        ->countErrors(),
      'logs' => $this
        ->sanitizeLogs($this->logger
        ->getLogs()),
      'deprecation_count' => $this
        ->computeDeprecationCount(),
    );
  }
}