From e643ef6f0246a64574ba469d2683371cc687bf3e Mon Sep 17 00:00:00 2001 From: David Maus <dmaus@ictsoc.de> Date: Sun, 3 Mar 2013 10:35:03 +0100 Subject: [PATCH] Include request duration in log output * VuFindSearch/Backend/Solr/Connector.php (sendRequest): Include request duration in log output. --- .../VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php index daa24306684..62f3cb51989 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php @@ -532,10 +532,12 @@ class Connector $this->lastRequest = array('parameters' => $params, 'handler' => $handler, 'method' => $method); + $time = microtime(true); $response = $client->send(); + $time = microtime(true) - $time; if ($this->logger) { - $this->logger->debug(sprintf('<= %s %s', $response->getStatusCode(), $response->getReasonPhrase())); + $this->logger->debug(sprintf('<= %s %s', $response->getStatusCode(), $response->getReasonPhrase()), array('time' => $time)); } if (!$response->isSuccess()) { -- GitLab