Skip to content
Snippets Groups Projects
Commit 97594177 authored by David Maus's avatar David Maus
Browse files

Remove unused logger dependency

* VuFindSearch/Service.php ($logger, setLogger, log): Remove unused
logger dependency.
* ../Module.php (setup): Dto.
parent 252cc378
Branches
Tags
No related merge requests found
......@@ -101,9 +101,6 @@ class Module
public function setup(ServiceManager $sm)
{
$service = new Service();
if ($sm->has('VuFind\Logger')) {
$service->setLogger($sm->get('VuFind\Logger'));
}
return $service;
}
}
\ No newline at end of file
......@@ -33,7 +33,6 @@ use VuFindSearch\Backend\BackendInterface;
use VuFindSearch\Feature\RetrieveBatchInterface;
use VuFindSearch\Backend\Exception\BackendException;
use Zend\Log\LoggerInterface;
use Zend\EventManager\EventManagerInterface;
use Zend\EventManager\EventManager;
......@@ -65,13 +64,6 @@ class Service
*/
protected $events;
/**
* Logger, if any.
*
* @var LoggerInterface
*/
protected $logger;
/**
* Cache resolved backends.
*
......@@ -226,18 +218,6 @@ class Service
return $response;
}
/**
* Set application logger.
*
* @param LoggerInterface $logger Logger
*
* @return void
*/
public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
}
/**
* Set EventManager instance.
*
......@@ -342,19 +322,4 @@ class Service
$this->getEventManager()->trigger(self::EVENT_POST, $response, $args);
}
/**
* Send a message to the logger.
*
* @param string $level Log level
* @param string $message Log message
* @param array $context Log context
*
* @return void
*/
protected function log($level, $message, array $context = array())
{
if ($this->logger) {
$this->logger->$level($message, $context);
}
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment