From 70e6cb2e7ea3459ab2f8040f87d1a41e17fa13b3 Mon Sep 17 00:00:00 2001 From: Tim Nagel Date: Tue, 10 Dec 2013 21:25:38 +1100 Subject: [PATCH] Fix issue with logger not having logQuery method --- Client.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Client.php b/Client.php index 119f420..ea0c572 100644 --- a/Client.php +++ b/Client.php @@ -4,6 +4,7 @@ namespace FOS\ElasticaBundle; use Elastica\Client as ElasticaClient; use Elastica\Request; +use FOS\ElasticaBundle\Logger\ElasticaLogger; /** * @author Gordon Franke @@ -15,7 +16,7 @@ class Client extends ElasticaClient $start = microtime(true); $response = parent::request($path, $method, $data, $query); - if (null !== $this->_logger) { + if (null !== $this->_logger and $this->_logger instanceof ElasticaLogger) { $time = microtime(true) - $start; $connection = $this->getLastRequest()->getConnection();