Skip to content

Commit

Permalink
Expose configuration for the ConsoleHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Feb 22, 2019
1 parent 523768f commit cc9abf6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions DependencyInjection/Configuration.php
Expand Up @@ -36,6 +36,7 @@
* - [verbosity_levels]: level => verbosity configuration
* - [level]: level name or int value, defaults to DEBUG
* - [bubble]: bool, defaults to true
* - [console_formater_options]: array
*
* - firephp:
* - [level]: level name or int value, defaults to DEBUG
Expand Down Expand Up @@ -571,6 +572,16 @@ public function getConfigTreeBuilder()
->then(function ($v) { return array_filter(array_map('trim', $v)); })
->end()
->prototype('scalar')->end()
->end()
// console
->variableNode('console_formater_options')
->defaultValue([])
->validate()
->ifTrue(function ($v) {
return !is_array($v);
})
->thenInvalid('console_formater_options must an array.')
->end()
->end()
->arrayNode('verbosity_levels') // console
->beforeNormalization()
Expand Down
1 change: 1 addition & 0 deletions DependencyInjection/MonologExtension.php
Expand Up @@ -176,6 +176,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
null,
$handler['bubble'],
isset($handler['verbosity_levels']) ? $handler['verbosity_levels'] : array(),
$handler['console_formater_options']
));
$definition->addTag('kernel.event_subscriber');
break;
Expand Down

0 comments on commit cc9abf6

Please sign in to comment.