lib/madvertise/logging/airbrake.rb in madvertise-logging-0.9.2 vs lib/madvertise/logging/airbrake.rb in madvertise-logging-0.9.3

- old
+ new

@@ -5,14 +5,17 @@ class ImprovedLogger # Log an exception with airbrake. # # @param [Exception] exc The exception to log. # @param [String] message Additional reason to log. - def exception(exc, message = nil, attribs = {}) + def exception_with_airbrake(exc, message = nil, attribs = {}) Airbrake.notify_or_ignore(exc, { :error_message => message, :cgi_data => ENV.to_hash, }.merge(attribs)) end + + alias_method :exception_without_airbrake, :exception + alias_method :exception, :exception_with_airbrake end end end