Skip to content

Commit f5d3ff6

Browse files
committed
Adding exclude_fields in the configuration of slack handlers
1 parent 33bf5ca commit f5d3ff6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

DependencyInjection/Configuration.php

+3
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@
267267
* - [bubble]: bool, defaults to true
268268
* - [timeout]: float
269269
* - [connection_timeout]: float
270+
* - [exclude_fields]: array, defaults to empty array
270271
*
271272
* - slackwebhook:
272273
* - webhook_url: slack webhook URL
@@ -278,6 +279,7 @@
278279
* - [include_extra]: bool, defaults to false
279280
* - [level]: level name or int value, defaults to DEBUG
280281
* - [bubble]: bool, defaults to true
282+
* - [exclude_fields]: array, defaults to empty array
281283
*
282284
* - slackbot:
283285
* - team: slack team slug
@@ -546,6 +548,7 @@ public function getConfigTreeBuilder(): TreeBuilder
546548
->scalarNode('use_attachment')->defaultTrue()->end() // slack & slackwebhook
547549
->scalarNode('use_short_attachment')->defaultFalse()->end() // slack & slackwebhook
548550
->scalarNode('include_extra')->defaultFalse()->end() // slack & slackwebhook
551+
->variableNode('exclude_fields')->defaultValue([])->end() // slack & slackwebhook
549552
->scalarNode('icon_emoji')->defaultNull()->end() // slack & slackwebhook
550553
->scalarNode('webhook_url')->end() // slackwebhook
551554
->scalarNode('team')->end() // slackbot

DependencyInjection/MonologExtension.php

+2
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
664664
$handler['bubble'],
665665
$handler['use_short_attachment'],
666666
$handler['include_extra'],
667+
$handler['exclude_fields'],
667668
]);
668669
if (isset($handler['timeout'])) {
669670
$definition->addMethodCall('setTimeout', [$handler['timeout']]);
@@ -684,6 +685,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
684685
$handler['include_extra'],
685686
$handler['level'],
686687
$handler['bubble'],
688+
$handler['exclude_fields'],
687689
]);
688690
break;
689691

0 commit comments

Comments
 (0)