[icinga-checkins] icinga.org: icingaweb2-module-logstash/master: Print longer error messages from Elasticsearch

git at icinga.org git at icinga.org
Fri Feb 5 14:05:45 CET 2016


Module: icingaweb2-module-logstash
Branch: master
Commit: dff231575707f12106a878b4db42242886fd650d
URL:    https://git.icinga.org/?p=icingaweb2-module-logstash.git;a=commit;h=dff231575707f12106a878b4db42242886fd650d

Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Thu Jun 18 18:05:18 2015 +0200

Print longer error messages from Elasticsearch

---

 library/Logstash/Curl.php |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/library/Logstash/Curl.php b/library/Logstash/Curl.php
index a414df5..9b89112 100644
--- a/library/Logstash/Curl.php
+++ b/library/Logstash/Curl.php
@@ -102,8 +102,8 @@ class Curl {
 
         if ($status !== 200) {
             $short_result = $result;
-            if (strlen($short_result) > 50)
-                $short_result = substr($short_result, 0, 47)."...";
+            if (strlen($short_result) > 1000)
+                $short_result = substr($short_result, 0, 997)."...";
 
             throw new Exception(
                 sprintf(



More information about the icinga-checkins mailing list