update to PSR3 LoggerInterface per change in ruflin/elastica
This commit is contained in:
parent
43d1531cd4
commit
f374dbbaa2
|
@ -7,6 +7,8 @@ use Elastica\Request;
|
|||
|
||||
use FOS\ElasticaBundle\Logger\ElasticaLogger;
|
||||
|
||||
use PSR\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* @author Gordon Franke <info@nevalon.de>
|
||||
*/
|
||||
|
@ -17,7 +19,7 @@ class Client extends ElasticaClient
|
|||
*/
|
||||
protected $logger;
|
||||
|
||||
public function setLogger(ElasticaLogger $logger)
|
||||
public function setLogger(LoggerInterface $logger)
|
||||
{
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace FOS\ElasticaBundle\Logger;
|
||||
|
||||
use Symfony\Component\HttpKernel\Log\LoggerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* Logger for the Elastica.
|
||||
|
@ -12,7 +12,7 @@ use Symfony\Component\HttpKernel\Log\LoggerInterface;
|
|||
*
|
||||
* @author Gordon Franke <info@nevalon.de>
|
||||
*/
|
||||
class ElasticaLogger
|
||||
class ElasticaLogger implements LoggerInterface
|
||||
{
|
||||
protected $logger;
|
||||
protected $queries;
|
||||
|
@ -75,4 +75,76 @@ class ElasticaLogger
|
|||
{
|
||||
return $this->queries;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function emergency($message, array $context = array())
|
||||
{
|
||||
return $this->logger->emergency($message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function alert($message, array $context = array())
|
||||
{
|
||||
return $this->logger->alert($message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function critical($message, array $context = array())
|
||||
{
|
||||
return $this->logger->critical($message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function error($message, array $context = array())
|
||||
{
|
||||
return $this->logger->error($message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function warning($message, array $context = array())
|
||||
{
|
||||
return $this->logger->warning($message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function notice($message, array $context = array())
|
||||
{
|
||||
return $this->logger->notice($message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function info($message, array $context = array())
|
||||
{
|
||||
return $this->logger->info($message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function debug($message, array $context = array())
|
||||
{
|
||||
return $this->logger->debug($message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function log($level, $message, array $context = array())
|
||||
{
|
||||
return $this->logger->log($message, $context);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue