src/MonologFactory.php
/**
     * @param Logger $Logger Logger to configure
     * @param array $config handlers configuration
     *
     * @throws HandlerClassMissingException
     * @throws SectionArgsMissingException
     */
@param Logger $Logger Logger to configure
@param array $config handlers configuration


@param Logger $Logger Logger to configure @param array $config handlers configuration
protected function configureHandlers(Logger $Logger, array $config) {
        foreach ($config as $handlerConfig) {
            if (!isset($handlerConfig[Config::HANDLER_CLASS])) {
                throw new HandlerClassMissingException('Handler class is missing for [' . $Logger->getName() . '] log');
            }
            if (!isset($handlerConfig[Config::HANDLER_ARGS])) {
                throw new SectionArgsMissingException('Section args is missing for [' . $Logger->getName() . '] log');
            }
            $Reflector = new ReflectionClass($handlerConfig[Config::HANDLER_CLASS]);
            $AbstractHandler = $Reflector->newInstanceArgs($handlerConfig[Config::HANDLER_ARGS]);
            if (isset($handlerConfig[Config::HANDLER_FORMATTER])) {
                $this->configureFormatter($Logger, $AbstractHandler, $handlerConfig[Config::HANDLER_FORMATTER]);
            }
            $Logger->pushHandler($AbstractHandler);
        }
    }
protected function configureHandlers ( Logger $ Logger , array $ config ) { foreach ( $ config as $ handlerConfig ) { if ( ! isset ( $ handlerConfig [ Config :: HANDLER_CLASS ] ) ) { throw new HandlerClassMissingException ( 'Handler class is missing for [' . $ Logger -> getName ( ) . '] log' ) ; } if ( ! isset ( $ handlerConfig [ Config :: HANDLER_ARGS ] ) ) { throw new SectionArgsMissingException ( 'Section args is missing for [' . $ Logger -> getName ( ) . '] log' ) ; } $ Reflector = new ReflectionClass ( $ handlerConfig [ Config :: HANDLER_CLASS ] ) ; $ AbstractHandler = $ Reflector -> newInstanceArgs ( $ handlerConfig [ Config :: HANDLER_ARGS ] ) ; if ( isset ( $ handlerConfig [ Config :: HANDLER_FORMATTER ] ) ) { $ this -> configureFormatter ( $ Logger , $ AbstractHandler , $ handlerConfig [ Config :: HANDLER_FORMATTER ] ) ; } $ Logger -> pushHandler ( $ AbstractHandler ) ; } }
@param Logger $Logger Logger to configure
 @param array $config handlers configuration
@param Logger $Logger Logger to configure @param array $config handlers configuration
/** @var HandlerInterface $AbstractHandler */