From 384c8a97cccaba425b8590038f94aff84016c3ae Mon Sep 17 00:00:00 2001 From: Jordan Sissel Date: Thu, 16 Aug 2012 11:58:00 -0700 Subject: [PATCH] - Make '-vvv' no longer set $DEBUG (ruby global). Setting $DEBUG = true causes ruby to log all exceptions, caught or otherwise (or something), and this was tripping up users causing them to report false bugs. To get the $DEBUG behavior again, you can now set RUBY_DEBUG=1 in your environment. --- lib/logstash/agent.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/logstash/agent.rb b/lib/logstash/agent.rb index 69253eb91..af5da6bf5 100644 --- a/lib/logstash/agent.rb +++ b/lib/logstash/agent.rb @@ -218,10 +218,11 @@ class LogStash::Agent STDERR.reopen(logfile) end - if @verbose >= 3 # Uber debugging. - @logger.level = :debug + if ENV.include?("RUBY_DEBUG") $DEBUG = true - elsif @verbose == 2 # logstash debug logs + end + + if @verbose >= 2 # logstash debug logs @logger.level = :debug elsif @verbose == 1 # logstash info logs @logger.level = :info