public function addAllHandlers(
        string $configKeyName = 'handlers',
        string $configFileName = 'monolog.php'
    ) {
        $handlers = $this->config->getValue($configKeyName, $configFileName);
        
        if (!is_array($handlers)) {
            throw new Exception(
                'Handlers list into monolog config file should be an array.',
                self::ERR_HANDLERS_LIST_FORMAT
            );
        }
        
        if (array_key_exists('name', $handlers)) {
            $handlers = [$handlers];
        }
        
        foreach ($handlers as $handlerInfos) {
            $this->addNewHandler($handlerInfos);
        }
    }
public function addAllHandlers(
        string $configKeyName = 'handlers',
        string $configFileName = 'monolog.php'
    ) {
        $handlers = $this->config->getValue($configKeyName, $configFileName);
        
        if (!is_array($handlers)) {
            throw new Exception(
                'Handlers list into monolog config file should be an array.',
                self::ERR_HANDLERS_LIST_FORMAT
            );
        }
        
        if (array_key_exists('name', $handlers)) {
            $handlers = [$handlers];
        }
        
        foreach ($handlers as $handlerInfos) {
            $this->addNewHandler($handlerInfos);
        }
    }
public function addAllHandlers ( string $ configKeyName = 'handlers' , string $ configFileName = 'monolog.php' ) { $ handlers = $ this -> config -> getValue ( $ configKeyName , $ configFileName ) ; if ( ! is_array ( $ handlers ) ) { throw new Exception ( 'Handlers list into monolog config file should be an array.' , self :: ERR_HANDLERS_LIST_FORMAT ) ; } if ( array_key_exists ( 'name' , $ handlers ) ) { $ handlers = [ $ handlers ] ; } foreach ( $ handlers as $ handlerInfos ) { $ this -> addNewHandler ( $ handlerInfos ) ; } }
Adding all handlers to monolog logger

@param string $configKeyName The key name containing handlers list
@param string $configFileName The config file name containing handlers
list

@throws \Exception

@return void
Adding all handlers to monolog logger