* http://www.gnu.org/copyleft/gpl.html
*
* @file
- * @author Aaron Schulz
*/
+use Psr\Log\LoggerInterface;
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\NullLogger;
/**
* Base class for reliable event relays
*/
-abstract class EventRelayer {
+abstract class EventRelayer implements LoggerAwareInterface {
+ /** @var LoggerInterface */
+ protected $logger;
+
/**
* @param array $params
*/
public function __construct( array $params ) {
+ $this->logger = new NullLogger();
}
/**
return $this->doNotify( $channel, $events );
}
+ public function setLogger( LoggerInterface $logger ) {
+ $this->logger = $logger;
+ }
+
/**
* @param string $channel
* @param array $events List of event data maps
*/
abstract protected function doNotify( $channel, array $events );
}
-