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

@return \Monolog\Handler\HandlerInterface The logger handler instance
Creates a new logger handler instance based on the passed handler configuration . @return \ Monolog \ Handler \ HandlerInterface The logger handler instance
public function factory(HandlerConfigurationInterface $handlerConfiguration)
    {
        $possibleHandler = $this->getContainer()->get($handlerConfiguration->getId());
        if ($possibleHandler instanceof HandlerFactoryInterface) {
            $handler = $possibleHandler->factory($handlerConfiguration);
        } else {
            $handler = $possibleHandler;
        }
        if ($formatterConfiguration = $handlerConfiguration->getFormatter()) {
            $handler->setFormatter($this->getMonologLoggerFormatterFactory()->factory($formatterConfiguration));
        }
        return $handler;
    }
public function factory ( HandlerConfigurationInterface $ handlerConfiguration ) { $ possibleHandler = $ this -> getContainer ( ) -> get ( $ handlerConfiguration -> getId ( ) ) ; if ( $ possibleHandler instanceof HandlerFactoryInterface ) { $ handler = $ possibleHandler -> factory ( $ handlerConfiguration ) ; } else { $ handler = $ possibleHandler ; } if ( $ formatterConfiguration = $ handlerConfiguration -> getFormatter ( ) ) { $ handler -> setFormatter ( $ this -> getMonologLoggerFormatterFactory ( ) -> factory ( $ formatterConfiguration ) ) ; } return $ handler ; }
Creates a new logger handler instance based on the passed handler configuration.
Creates a new logger handler instance based on the passed handler configuration .
// create the handler (factory) instance // query whether or not we've a factory or the instance // if we've a formatter, initialize the formatter also // return the handler