Module: ExceptionNotification

Defined in:
lib/exception_notification.rb

Defined Under Namespace

Modules: ConsiderLocal, CustomExceptionClasses, CustomExceptionMethods, DeprecatedMethods, ExceptionNotifiable, GitBlame, HelpfulHashes, HooksNotifier, Notifiable, NotifiableHelper, NotifierHelper Classes: Notifier

Class Method Summary (collapse)

Class Method Details

+ (Object) initialize



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/exception_notification.rb', line 16

def self.initialize
  if defined?(ActionController::Base)
    ActionController::Base.send(:include, ExceptionNotification::ExceptionNotifiable)
  end

#TODO: Set this in gobal SEN config as the logger like they do in HoptoadNotifier
#    rails_logger = if defined?(::Rails.logger)
#                     ::Rails.logger
#                   elsif defined?(RAILS_DEFAULT_LOGGER)
#                     RAILS_DEFAULT_LOGGER
#                   end
#    HoptoadNotifier.configure(true) do |config|
#      config.logger = rails_logger
#      config.environment_name = 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