Use stderr instead of puts

Fixes #6172
This commit is contained in:
Suyog Rao 2016-11-02 12:41:51 -07:00
parent 0b457996d0
commit 5624b17735

View file

@ -281,7 +281,7 @@ class LogStash::Runner < Clamp::StrictCommand
rescue => e
# if logger itself is not initialized
if LogStash::Logging::Logger.get_logging_context.nil?
puts e
$stderr.puts "#{I18n.t("oops")} :error => #{e}, :backtrace => #{e.backtrace}"
else
logger.fatal(I18n.t("oops"), :error => e, :backtrace => e.backtrace)
end