Sha256: 364e55c29d3615095523ff7c0bc99b1b2ec6e7437d71dbf8748031ce77953437
Contents?: true
Size: 988 Bytes
Versions: 16
Compression:
Stored size: 988 Bytes
Contents
# Rails 2.x support require "bugsnag" require "bugsnag/rails/controller_methods" require "bugsnag/rails/action_controller_rescue" module Bugsnag module Rails def self.initialize if defined?(ActionController::Base) ActionController::Base.send(:include, Bugsnag::Rails::ActionControllerRescue) ActionController::Base.send(:include, Bugsnag::Rails::ControllerMethods) end # Try to find where to log to rails_logger = nil if defined?(::Rails.logger) rails_logger = ::Rails.logger elsif defined?(RAILS_DEFAULT_LOGGER) rails_logger = RAILS_DEFAULT_LOGGER end Bugsnag.configure do |config| config.logger = rails_logger config.release_stage = RAILS_ENV if defined?(RAILS_ENV) config.project_root = RAILS_ROOT if defined?(RAILS_ROOT) config.framework = "Rails: #{::Rails::VERSION::STRING}" if defined?(::Rails::VERSION) end end end end Bugsnag::Rails.initialize
Version data entries
16 entries across 16 versions & 1 rubygems