code: public function getConfigTreeBuilder()
      {
          $treeBuilder = new TreeBuilder();
          $rootNode = $treeBuilder->root('logging');
  
          $rootNode
              ->children()
                  ->arrayNode('channels')
                      ->useAttributeAsKey('name')
                      ->prototype('array')
                          ->addDefaultsIfNotSet()
                          ->children()
                              ->scalarNode('handler')
                                  ->isRequired()
                                  ->validate()
                                      ->ifNotInArray(array('stream', 'error_log'))
                                      ->thenInvalid('Invalid logging handler %s')
                                  ->end()
                              ->end()
                              ->scalarNode('level')->defaultValue(200)->end()
                              ->arrayNode('options')->defaultValue(array())
                                  ->prototype('scalar')
                              ->end()
                          ->end()
                      ->end()
                  ->end()
              ->end();
  
          return $treeBuilder;
      }
docs: Generates the configuration tree builder.
  
  @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder