- 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.
This commit is contained in:
Jordan Sissel 2012-08-16 11:58:00 -07:00
parent 2049634624
commit 384c8a97cc

View file

@ -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