Skip to content

Commit 91c6ecb

Browse files
committed
Added timeout and conection timeout to logentries handle config
definition
1 parent c25e740 commit 91c6ecb

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
@@ -232,6 +232,8 @@
232232
* - [use_ssl]: whether or not SSL encryption should be used, defaults to true
233233
* - [level]: level name or int value, defaults to DEBUG
234234
* - [bubble]: bool, defaults to true
235+
* - [timeout]: float
236+
* - [connection_timeout]: float
235237
*
236238
* - flowdock:
237239
* - token: flowdock api token
@@ -460,8 +462,8 @@ public function getConfigTreeBuilder()
460462
->end()
461463
->booleanNode('lazy')->defaultValue(true)->end() // swift_mailer
462464
->scalarNode('connection_string')->end() // socket_handler
463-
->scalarNode('timeout')->end() // socket_handler
464-
->scalarNode('connection_timeout')->end() // socket_handler
465+
->scalarNode('timeout')->end() // socket_handler & logentries
466+
->scalarNode('connection_timeout')->end() // socket_handler & logentries
465467
->booleanNode('persistent')->end() // socket_handler
466468
->scalarNode('dsn')->end() // raven_handler
467469
->scalarNode('client_id')->defaultNull()->end() // raven_handler

DependencyInjection/MonologExtension.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,12 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
572572
$handler['level'],
573573
$handler['bubble'],
574574
));
575+
if (isset($handler['timeout'])) {
576+
$definition->addMethodCall('setTimeout', array($handler['timeout']));
577+
}
578+
if (isset($handler['connection_timeout'])) {
579+
$definition->addMethodCall('setConnectionTimeout', array($handler['connection_timeout']));
580+
}
575581
break;
576582

577583
case 'flowdock':

0 commit comments

Comments
 (0)