public static function createLoggers(ConfigurationInterface $configuration)
    {

        // initialize the collection for the loggers
        $loggers = new ArrayCollection();

        // initialize the default system logger
        $systemLogger = new Logger('techdivision/import');
        $systemLogger->pushHandler(
            new ErrorLogHandler(
                ErrorLogHandler::OPERATING_SYSTEM,
                $configuration->getLogLevel()
            )
        );

        // add it to the array
        $loggers->set(LoggerKeys::SYSTEM, $systemLogger);

        // append the configured loggers or override the default one
        foreach ($configuration->getLoggers() as $loggerConfiguration) {
            // load the factory class that creates the logger instance
            $loggerFactory = $loggerConfiguration->getFactory();
            // create the logger instance and add it to the available loggers
            $loggers->set($loggerConfiguration->getName(), $loggerFactory::factory($configuration, $loggerConfiguration));
        }

        // return the collection with the initialized loggers
        return $loggers;
    }
public static function createLoggers(ConfigurationInterface $configuration)
    {

        // initialize the collection for the loggers
        $loggers = new ArrayCollection();

        // initialize the default system logger
        $systemLogger = new Logger('techdivision/import');
        $systemLogger->pushHandler(
            new ErrorLogHandler(
                ErrorLogHandler::OPERATING_SYSTEM,
                $configuration->getLogLevel()
            )
        );

        // add it to the array
        $loggers->set(LoggerKeys::SYSTEM, $systemLogger);

        // append the configured loggers or override the default one
        foreach ($configuration->getLoggers() as $loggerConfiguration) {
            // load the factory class that creates the logger instance
            $loggerFactory = $loggerConfiguration->getFactory();
            // create the logger instance and add it to the available loggers
            $loggers->set($loggerConfiguration->getName(), $loggerFactory::factory($configuration, $loggerConfiguration));
        }

        // return the collection with the initialized loggers
        return $loggers;
    }
public static function createLoggers ( ConfigurationInterface $ configuration ) { // initialize the collection for the loggers $ loggers = new ArrayCollection ( ) ; // initialize the default system logger $ systemLogger = new Logger ( 'techdivision/import' ) ; $ systemLogger -> pushHandler ( new ErrorLogHandler ( ErrorLogHandler :: OPERATING_SYSTEM , $ configuration -> getLogLevel ( ) ) ) ; // add it to the array $ loggers -> set ( LoggerKeys :: SYSTEM , $ systemLogger ) ; // append the configured loggers or override the default one foreach ( $ configuration -> getLoggers ( ) as $ loggerConfiguration ) { // load the factory class that creates the logger instance $ loggerFactory = $ loggerConfiguration -> getFactory ( ) ; // create the logger instance and add it to the available loggers $ loggers -> set ( $ loggerConfiguration -> getName ( ) , $ loggerFactory :: factory ( $ configuration , $ loggerConfiguration ) ) ; } // return the collection with the initialized loggers return $ loggers ; }
Create's and return's the loggers to use.

@param \TechDivision\Import\ConfigurationInterface $configuration The configuration with the data to create the loggers with

@return \Doctrine\Common\Collections\ArrayCollection The array with the initialized loggers
Create s and return s the loggers to use .