lib/wat_catcher/report.rb in wat_catcher-0.8.9 vs lib/wat_catcher/report.rb in wat_catcher-0.9.0

- old
+ new

@@ -6,14 +6,20 @@ self.exception = exception self.request = request self.sidekiq = sidekiq self.user = user send_report + log_report end def send_report return if WatCatcher.configuration.disabled ::WatCatcher::SidekiqPoster.perform_async("#{WatCatcher.configuration.host}/wats", params) + end + + def log_report + return if WatCatcher.configuration.disabled + Rails.logger.error( "WatCatcher::error: " + base_description.tap {|x| x.delete(:rails_root) }.to_json ) end def params { wat: base_description .merge(user_description)