Use stderr instead of puts

Fixes #6172
This commit is contained in:
Suyog Rao 2016-11-02 12:41:51 -07:00
parent 18a7d2fd27
commit 53f7a64ccb

View file

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