Sha256: 1f675780cc3ab87dfddebb7ae329925a592aca3eb4c53cb0d8ad492f2fef54f8

Contents?: true

Size: 593 Bytes

Versions: 18

Compression:

Stored size: 593 Bytes

Contents

require 'airbrake'

module Madvertise
  module Logging
    class ImprovedLogger
      # Log an exception with airbrake.
      #
      # @param [Exception] exc  The exception to log.
      # @param [String] message  Additional reason to log.
      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

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
madvertise-logging-1.3.0 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.3.0-java lib/madvertise/logging/airbrake.rb
madvertise-logging-1.2.1 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.2.1-java lib/madvertise/logging/airbrake.rb
madvertise-logging-1.2.0 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.1.2 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.1.1 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.1.0 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.0.3 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.0.2 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.0.1 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.0.0 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.0.0.rc4 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.0.0.rc3 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.0.0.rc2 lib/madvertise/logging/airbrake.rb
madvertise-logging-1.0.0.rc1 lib/madvertise/logging/airbrake.rb
madvertise-logging-0.9.4 lib/madvertise/logging/airbrake.rb
madvertise-logging-0.9.3 lib/madvertise/logging/airbrake.rb