|
@@ -66,10 +66,16 @@ class Configuration
|
|
|
->scalarNode('level')->defaultValue('DEBUG')->end()
|
|
|
->booleanNode('bubble')->defaultFalse()->end()
|
|
|
->scalarNode('path')->end() // stream specific
|
|
|
+ ->validate()
|
|
|
+ ->ifTrue(function($v) { return 'stream' === $v['type'] && !isset($v['path']); })
|
|
|
+ ->thenInvalid('The path has to be specified to use a StreamHandler')
|
|
|
+ ->end()
|
|
|
->end()
|
|
|
->validate()
|
|
|
->ifTrue(function($v) { return 'fingerscrossed' === $v['type'] && !isset($v['handler']); })
|
|
|
->thenInvalid('The handler has to be specified to use a FingersCrossedHandler')
|
|
|
+ ->end()
|
|
|
+ ->validate()
|
|
|
->ifTrue(function($v) { return 'stream' === $v['type'] && !isset($v['path']); })
|
|
|
->thenInvalid('The path has to be specified to use a StreamHandler')
|
|
|
->end()
|