add data collector for client class
This commit is contained in:
parent
14db48ddbd
commit
914dbca3aa
7 changed files with 214 additions and 2 deletions
21
Client.php
Normal file
21
Client.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
namespace FOQ\ElasticaBundle;
|
||||
|
||||
use Elastica_Client;
|
||||
|
||||
/**
|
||||
* @author Gordon Franke <info@nevalon.de>
|
||||
*/
|
||||
class Client extends Elastica_Client
|
||||
{
|
||||
public function setLogger($logger)
|
||||
{
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
public function request($path, $method, $data = array()) {
|
||||
$this->logger->logQuery($path, $method, $data);
|
||||
|
||||
return parent::request($path, $method, $data);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue