/**
  * Log the query if we have an instance of ElasticaLogger.
  *
  * @param string $command
  * @param string $method
  * @param array  $data
  * @param int    $start
  */
 public function logCommand($command, $method, $data, $start, $response = '', $error = '', $exitStatus = 0)
 {
     if (!$this->logger or !$this->logger instanceof GitCommandLogger) {
         return;
     }
     $time = microtime(true) - $start;
     $this->logger->logCommand($command, $method, $data, $time, $response, $error, $exitStatus);
 }
 public function collect(Request $request, Response $response, \Exception $exception = null)
 {
     $this->data['commands_count'] = $this->logger->getCommandsCount();
     $this->data['commands'] = $this->logger->getCommands();
 }