src/Loggers/ErrorLogHandlerFactory.php
/**
     * Creates a new formatter instance based on the passed configuration.
     *
     * @param \TechDivision\Import\Configuration\Logger\HandlerConfigurationInterface $handlerConfiguration The handler configuration
     *
     * @return \Monolog\Handler\HandlerInterface The handler instance
     */
Creates a new formatter instance based on the passed configuration.

@return \Monolog\Handler\HandlerInterface The handler instance
Creates a new formatter instance based on the passed configuration . @return \ Monolog \ Handler \ HandlerInterface The handler instance
public function factory(HandlerConfigurationInterface $handlerConfiguration)
    {
        $params = $handlerConfiguration->getParams();
        if (!isset($params[ConfigurationKeys::LEVEL])) {
            $params[ConfigurationKeys::LEVEL] = $this->defaultLogLevel;
        }
        $reflectionClass = new \ReflectionClass(ErrorLogHandler::class);
        return $reflectionClass->newInstanceArgs(ConfigurationUtil::prepareConstructorArgs($reflectionClass, $params));
    }
public function factory ( HandlerConfigurationInterface $ handlerConfiguration ) { $ params = $ handlerConfiguration -> getParams ( ) ; if ( ! isset ( $ params [ ConfigurationKeys :: LEVEL ] ) ) { $ params [ ConfigurationKeys :: LEVEL ] = $ this -> defaultLogLevel ; } $ reflectionClass = new \ ReflectionClass ( ErrorLogHandler :: class ) ; return $ reflectionClass -> newInstanceArgs ( ConfigurationUtil :: prepareConstructorArgs ( $ reflectionClass , $ params ) ) ; }
Creates a new formatter instance based on the passed configuration.
Creates a new formatter instance based on the passed configuration .
// load the params // set the default log level, if not already set explicitly // create and return the handler instance