src/Loggers/LoggerFactory.php
/**
     * Create's and return's the loggers to use.
     *
     * @return \Doctrine\Common\Collections\ArrayCollection The array with the initialized loggers
     */
Create's and return's the loggers to use.
@return \Doctrine\Common\Collections\ArrayCollection The array with the initialized loggers
Create ' s and return ' s the loggers to use . @return \ Doctrine \ Common \ Collections \ ArrayCollection The array with the initialized loggers
public function createLoggers()
    {
        $configuration = $this->getConfiguration();
        $loggers = new ArrayCollection();
        $systemLogger = new Logger('techdivision/import');
        $systemLogger->pushHandler(
            new ErrorLogHandler(
                ErrorLogHandler::OPERATING_SYSTEM,
                $configuration->getLogLevel()
            )
        );
        $loggers->set(LoggerKeys::SYSTEM, $systemLogger);
        foreach ($configuration->getLoggers() as $name => $loggerConfiguration) {
            $loggerFactory = $this->getContainer()->get($loggerConfiguration->getId());
            $loggers->set($name, $loggerFactory->factory($configuration, $loggerConfiguration));
        }
        return $loggers;
    }
public function createLoggers ( ) { $ configuration = $ this -> getConfiguration ( ) ; $ loggers = new ArrayCollection ( ) ; $ systemLogger = new Logger ( 'techdivision/import' ) ; $ systemLogger -> pushHandler ( new ErrorLogHandler ( ErrorLogHandler :: OPERATING_SYSTEM , $ configuration -> getLogLevel ( ) ) ) ; $ loggers -> set ( LoggerKeys :: SYSTEM , $ systemLogger ) ; foreach ( $ configuration -> getLoggers ( ) as $ name => $ loggerConfiguration ) { $ loggerFactory = $ this -> getContainer ( ) -> get ( $ loggerConfiguration -> getId ( ) ) ; $ loggers -> set ( $ name , $ loggerFactory -> factory ( $ configuration , $ loggerConfiguration ) ) ; } return $ loggers ; }
Create's and return's the loggers to use.
Create ' s and return ' s the loggers to use .
// load the configuration instance // initialize the collection for the loggers // initialize the default system logger // add it to the array // append the configured loggers or override the default one // load the factory class that creates the logger instance // create the logger instance and add it to the available loggers // return the collection with the initialized loggers