ElasticaLogger cleanup

This commit is contained in:
Karel Souffriau 2014-02-25 11:05:26 +01:00
parent c8c72f5f0b
commit 2b04f6cf34

View file

@ -14,32 +14,42 @@ use Psr\Log\LoggerInterface;
*/
class ElasticaLogger implements LoggerInterface
{
/**
* @var LoggerInterface
*/
protected $logger;
protected $queries;
/**
* @var array
*/
protected $queries = array();
/**
* @var boolean
*/
protected $debug;
/**
* Constructor.
*
* @param LoggerInterface|null $logger The Symfony logger
* @param bool $debug
* @param boolean $debug
*/
public function __construct(LoggerInterface $logger = null, $debug = false)
{
$this->logger = $logger;
$this->queries = array();
$this->debug = $debug;
}
/**
* Logs a query.
*
* @param string $path Path to call
* @param string $method Rest method to use (GET, POST, DELETE, PUT)
* @param array $data arguments
* @param float $time execution time
* @param array $connection host, port and transport of the query
* @param array $query arguments
* @param string $path Path to call
* @param string $method Rest method to use (GET, POST, DELETE, PUT)
* @param array $data Arguments
* @param float $time Execution time
* @param array $connection Host, port and transport of the query
* @param array $query Arguments
*/
public function logQuery($path, $method, $data, $time, $connection = array(), $query = array())
{