for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Queryr\Replicator\Importer;
use Exception;
use Psr\Log\LoggerInterface;
use Queryr\Replicator\Model\EntityPage;
/**
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
class LoggingReporter implements PageImportReporter {
private $logger;
private $number = 0;
public function __construct( LoggerInterface $logger ) {
$this->logger = $logger;
}
public function started( EntityPage $entityPage ) {
$this->logger->info( "Importing entity " . ++$this->number . ': ' . $entityPage->getTitle() . '...' );
public function endedSuccessfully() {
$this->logger->debug( 'Entity imported' );
public function endedWithError( Exception $ex ) {
$this->logger->error( $ex->getMessage() );
public function stepStarted( string $message ) {
$this->logger->debug( 'Started step: ' . $message );
public function stepCompleted() {
$this->logger->debug( 'Step completed' );