Skip to content

Commit 61f32b6

Browse files
committed
Adding exclude_fields in the configuration of slack handlers
1 parent 4054b2e commit 61f32b6

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
@@ -251,6 +251,7 @@
251251
* - [bubble]: bool, defaults to true
252252
* - [timeout]: float
253253
* - [connection_timeout]: float
254+
* - [exclude_fields]: array, defaults to empty array
254255
*
255256
* - slackwebhook:
256257
* - webhook_url: slack webhook URL
@@ -262,6 +263,7 @@
262263
* - [include_extra]: bool, defaults to false
263264
* - [level]: level name or int value, defaults to DEBUG
264265
* - [bubble]: bool, defaults to true
266+
* - [exclude_fields]: array, defaults to empty array
265267
*
266268
* - slackbot:
267269
* - team: slack team slug
@@ -474,6 +476,7 @@ public function getConfigTreeBuilder()
474476
->scalarNode('use_attachment')->defaultTrue()->end() // slack & slackwebhook
475477
->scalarNode('use_short_attachment')->defaultFalse()->end() // slack & slackwebhook
476478
->scalarNode('include_extra')->defaultFalse()->end() // slack & slackwebhook
479+
->variableNode('exclude_fields')->defaultValue([])->end() // slack & slackwebhook
477480
->scalarNode('icon_emoji')->defaultNull()->end() // slack & slackwebhook
478481
->scalarNode('webhook_url')->end() // slackwebhook
479482
->scalarNode('team')->end() // slackbot

DependencyInjection/MonologExtension.php

+2
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
662662
$handler['bubble'],
663663
$handler['use_short_attachment'],
664664
$handler['include_extra'],
665+
$handler['exclude_fields'],
665666
]);
666667
if (isset($handler['timeout'])) {
667668
$definition->addMethodCall('setTimeout', [$handler['timeout']]);
@@ -682,6 +683,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
682683
$handler['include_extra'],
683684
$handler['level'],
684685
$handler['bubble'],
686+
$handler['exclude_fields'],
685687
]);
686688
break;
687689

0 commit comments

Comments
 (0)