Fix issue with logger not having logQuery method
This commit is contained in:
parent
da44ee65f6
commit
70e6cb2e7e
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ namespace FOS\ElasticaBundle;
|
|||
|
||||
use Elastica\Client as ElasticaClient;
|
||||
use Elastica\Request;
|
||||
use FOS\ElasticaBundle\Logger\ElasticaLogger;
|
||||
|
||||
/**
|
||||
* @author Gordon Franke <info@nevalon.de>
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue