lib/gorgon/crash_reporter.rb in gorgon-0.11.0 vs lib/gorgon/crash_reporter.rb in gorgon-0.11.1
- old
+ new
@@ -1,19 +1,21 @@
-module CrashReporter
- OUTPUT_LINES_TO_REPORT = 70
+module Gorgon
+ module CrashReporter
+ OUTPUT_LINES_TO_REPORT = 70
- def report_crash reply_exchange, info
- stdout = `tail -n #{OUTPUT_LINES_TO_REPORT} #{info[:out_file]}`
- stderr = `cat #{info[:err_file]}` + \
- info[:footer_text]
+ def report_crash reply_exchange, info
+ stdout = `tail -n #{OUTPUT_LINES_TO_REPORT} #{info[:out_file]}`
+ stderr = `cat #{info[:err_file]}` + \
+ info[:footer_text]
- send_crash_message reply_exchange, stdout, stderr
+ send_crash_message reply_exchange, stdout, stderr
- "#{stdout}\n#{stderr}"
- end
+ "#{stdout}\n#{stderr}"
+ end
- def send_crash_message reply_exchange, output, error
- reply = {:type => :crash, :hostname => Socket.gethostname,
- :stdout => output, :stderr => error}
- reply_exchange.publish(Yajl::Encoder.encode(reply))
+ def send_crash_message reply_exchange, output, error
+ reply = {:type => :crash, :hostname => Socket.gethostname,
+ :stdout => output, :stderr => error}
+ reply_exchange.publish(Yajl::Encoder.encode(reply))
+ end
end
end