public function RequestLogger::logQuery in Search API Elasticsearch 8
Parameters
$path:
$method:
$data:
array $connection:
array $query:
File
- src/
Logger/ RequestLogger.php, line 31
Class
- RequestLogger
- Class QueryLogger @package Drupal\search_api_elasticsearch\Logger
Namespace
Drupal\search_api_elasticsearch\LoggerCode
public function logQuery($path, $method, $data, $connection = array(), $query = array()) {
if ($this->debug) {
$this->queries[] = array(
'path' => $path,
'method' => $method,
'data' => $data,
'connection' => $connection,
'queryString' => $query,
);
}
if ($this->logger !== null) {
$message = sprintf("%s (%s)", $path, $method);
$this->logger
->info($message, (array) $data);
}
}