concrete/src/Logging/Configuration/AdvancedConfiguration.php
protected function prepareConfig($config)
    {
        if (isset($config['loggers']) && is_array($config['loggers'])
            && array_key_exists(Channels::META_CHANNEL_ALL, $config['loggers'])) {
    
            $allConfig = $config['loggers'][Channels::META_CHANNEL_ALL];
            $channels = array_merge(Channels::getCoreChannels(), [Channels::CHANNEL_APPLICATION]);
            foreach($channels as $channel) {
                $config['loggers'][$channel] = $allConfig;
            }
            unset($config['loggers'][Channels::META_CHANNEL_ALL]);
        }
        return $config;
    }
protected function prepareConfig($config)
    {
        if (isset($config['loggers']) && is_array($config['loggers'])
            && array_key_exists(Channels::META_CHANNEL_ALL, $config['loggers'])) {
    
            $allConfig = $config['loggers'][Channels::META_CHANNEL_ALL];
            $channels = array_merge(Channels::getCoreChannels(), [Channels::CHANNEL_APPLICATION]);
            foreach($channels as $channel) {
                $config['loggers'][$channel] = $allConfig;
            }
            unset($config['loggers'][Channels::META_CHANNEL_ALL]);
        }
        return $config;
    }
protected function prepareConfig ( $ config ) { if ( isset ( $ config [ 'loggers' ] ) && is_array ( $ config [ 'loggers' ] ) && array_key_exists ( Channels :: META_CHANNEL_ALL , $ config [ 'loggers' ] ) ) { $ allConfig = $ config [ 'loggers' ] [ Channels :: META_CHANNEL_ALL ] ; $ channels = array_merge ( Channels :: getCoreChannels ( ) , [ Channels :: CHANNEL_APPLICATION ] ) ; foreach ( $ channels as $ channel ) { $ config [ 'loggers' ] [ $ channel ] = $ allConfig ; } unset ( $ config [ 'loggers' ] [ Channels :: META_CHANNEL_ALL ] ) ; } return $ config ; }
Takes the config array we're going to pass to monolog cascade and transforms it a bit. For example, if we have
configuration we need to apply to all channels, we loop through all the channels in the channels class and
add them to the config array.
@param array $config
Takes the config array we re going to pass to monolog cascade and transforms it a bit . For example if we have configuration we need to apply to all channels we loop through all the channels in the channels class and add them to the config array .