From 91c6ecbf2c62504358e457664112b63c6d5ca0cb Mon Sep 17 00:00:00 2001 From: Daniel Gomes Date: Wed, 24 Feb 2016 22:46:27 +0000 Subject: [PATCH] Added timeout and conection timeout to logentries handle config definition --- DependencyInjection/Configuration.php | 6 ++++-- DependencyInjection/MonologExtension.php | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 78718d7d..21d85034 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -232,6 +232,8 @@ * - [use_ssl]: whether or not SSL encryption should be used, defaults to true * - [level]: level name or int value, defaults to DEBUG * - [bubble]: bool, defaults to true + * - [timeout]: float + * - [connection_timeout]: float * * - flowdock: * - token: flowdock api token @@ -460,8 +462,8 @@ public function getConfigTreeBuilder() ->end() ->booleanNode('lazy')->defaultValue(true)->end() // swift_mailer ->scalarNode('connection_string')->end() // socket_handler - ->scalarNode('timeout')->end() // socket_handler - ->scalarNode('connection_timeout')->end() // socket_handler + ->scalarNode('timeout')->end() // socket_handler & logentries + ->scalarNode('connection_timeout')->end() // socket_handler & logentries ->booleanNode('persistent')->end() // socket_handler ->scalarNode('dsn')->end() // raven_handler ->scalarNode('client_id')->defaultNull()->end() // raven_handler diff --git a/DependencyInjection/MonologExtension.php b/DependencyInjection/MonologExtension.php index c411d530..56aae3f1 100644 --- a/DependencyInjection/MonologExtension.php +++ b/DependencyInjection/MonologExtension.php @@ -572,6 +572,12 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler $handler['level'], $handler['bubble'], )); + if (isset($handler['timeout'])) { + $definition->addMethodCall('setTimeout', array($handler['timeout'])); + } + if (isset($handler['connection_timeout'])) { + $definition->addMethodCall('setConnectionTimeout', array($handler['connection_timeout'])); + } break; case 'flowdock':