protected function SearchApiSolrConnection::logResponse in Search API Solr 7
Logs a Solr response object.
Parameters
object $response: The response received from Solr.
1 call to SearchApiSolrConnection::logResponse()
- SearchApiSolrConnection::search in includes/
solr_connection.inc - Executes a search on the Solr server.
File
- includes/
solr_connection.inc, line 983
Class
- SearchApiSolrConnection
- Represents a Solr server resource.
Code
protected function logResponse($response) {
$data = $response->code . ' ' . $response->status_message;
if (!empty($response->response)) {
$data .= "\n" . print_r($response->response, TRUE);
}
watchdog('search_api_solr', 'Response: <div style="white-space: pre-wrap;">@response</div>', array(
'@response' => $data,
), WATCHDOG_DEBUG);
if (!empty($response->facet_counts)) {
watchdog('search_api_solr', 'Facets: <div style="white-space: pre-wrap;">@facets</div>', array(
'@facets' => print_r($response->facet_counts, TRUE),
), WATCHDOG_DEBUG);
}
}