flow-php/etl-adapter-logger

PHP ETL - Adapter - Logger

1.x-dev 2021-10-06 07:31 UTC

README

Minimum PHP Version

Description

ETL Adapter that provides PSR Logger support for ETL.

Loader - PsrLogger

Load each row into PsrLoggerInterface implementation.

<?php

$logger = new TestLogger();

$loader = new PsrLoggerLoader($logger, 'row log', LogLevel::ERROR);

$loader->load(new Rows(
    Row::create(
        new Row\Entry\IntegerEntry('id', 12345),
        Row\Entry\StringEntry::lowercase('name', 'Norbert')
    )
));

$this->assertTrue($logger->hasErrorRecords());
$this->assertTrue($logger->hasError('row log'));

Development

In order to install dependencies please, launch following commands:

composer install

Run Tests

In order to execute full test suite, please launch following command:

composer build

It's recommended to use pcov for code coverage however you can also use xdebug by setting XDEBUG_MODE=coverage env variable.