Skip to content

Commit

Permalink
if is view_all_logs is true, clear option log_files
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Semm committed Aug 26, 2012
1 parent 2840f9e commit 79dd0ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 8 additions & 0 deletions DependencyInjection/Configuration/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ public function getConfigTreeBuilder() {
$rootNode = $treeBuilder->root('fs_php4_log', 'array');
$rootNode->children()
->arrayNode('viewer')
->beforeNormalization()
->ifTrue(function($v){
return $v['view_all_logs'];
})
->then(function($v){
$v['log_files'] = array();
})
->end()
->children()
->booleanNode('view_all_logs')->cannotBeEmpty()->end()
->arrayNode('log_files')->end()
Expand Down
2 changes: 0 additions & 2 deletions DependencyInjection/FSLog4PhpExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public function load(array $configs, ContainerBuilder $container) {
$container->getDefinition('log4php.logger')->addMethodCall('configureLogger', array($config));

$container->setAlias('logger', 'log4php.logger');


}

public function getAlias() {
Expand Down

0 comments on commit 79dd0ab

Please sign in to comment.