Skip to content

Commit 8880042

Browse files
committed
Merge remote-tracking branch 'dcsg/add-timeout-and-connection-timeout-to-logentries'
2 parents 4572fad + 91c6ecb commit 8880042

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

DependencyInjection/Configuration.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@
235235
* - [use_ssl]: whether or not SSL encryption should be used, defaults to true
236236
* - [level]: level name or int value, defaults to DEBUG
237237
* - [bubble]: bool, defaults to true
238+
* - [timeout]: float
239+
* - [connection_timeout]: float
238240
*
239241
* - flowdock:
240242
* - token: flowdock api token
@@ -465,8 +467,8 @@ public function getConfigTreeBuilder()
465467
->end()
466468
->booleanNode('lazy')->defaultValue(true)->end() // swift_mailer
467469
->scalarNode('connection_string')->end() // socket_handler
468-
->scalarNode('timeout')->end() // socket_handler
469-
->scalarNode('connection_timeout')->end() // socket_handler
470+
->scalarNode('timeout')->end() // socket_handler & logentries
471+
->scalarNode('connection_timeout')->end() // socket_handler & logentries
470472
->booleanNode('persistent')->end() // socket_handler
471473
->scalarNode('dsn')->end() // raven_handler
472474
->scalarNode('client_id')->defaultNull()->end() // raven_handler

DependencyInjection/MonologExtension.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,12 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
576576
$handler['level'],
577577
$handler['bubble'],
578578
));
579+
if (isset($handler['timeout'])) {
580+
$definition->addMethodCall('setTimeout', array($handler['timeout']));
581+
}
582+
if (isset($handler['connection_timeout'])) {
583+
$definition->addMethodCall('setConnectionTimeout', array($handler['connection_timeout']));
584+
}
579585
break;
580586

581587
case 'flowdock':

0 commit comments

Comments
 (0)