<?php


namespace Kibo\Phast\Factories\Diagnostics\LogDrivers;


use Kibo\Phast\HTTP\Request;

class LogWritersFactory {

    public function make(array $config, Request $request) {
        $class = $config['class'];
        $factoryClass = str_replace('Kibo\Phast\\', 'Kibo\Phast\Factories\\', $class) . 'Factory';
        // TODO: set the logging level on the filter before we return it
        return (new $factoryClass())->make($config, $request);
    }

}

<?php


namespace Kibo\Phast\Factories\Diagnostics\LogDrivers;


use Kibo\Phast\HTTP\Request;

class LogWritersFactory {

    public function make(array $config, Request $request) {
        $class = $config['class'];
        $factoryClass = str_replace('Kibo\Phast\\', 'Kibo\Phast\Factories\\', $class) . 'Factory';
        $writer = (new $factoryClass())->make($config, $request);
        if (isset ($config['levelMask'])) {
            $writer->setLevelMask($config['levelMask']);
        }
        return $writer;
    }

}

Set logging level to writers before returning them from factory
Set logging level to writers before returning them from factory
