Module: Airbrake::Rails

Defined in:
lib/airbrake/rails.rb,
lib/airbrake/rails/app.rb,
lib/airbrake/rails/curb.rb,
lib/airbrake/rails/http.rb,
lib/airbrake/rails/event.rb,
lib/airbrake/rails/railtie.rb,
lib/airbrake/rails/net_http.rb,
lib/airbrake/rails/typhoeus.rb,
lib/airbrake/rails/active_job.rb,
lib/airbrake/rails/http_client.rb,
lib/airbrake/rails/active_record.rb,
lib/airbrake/rails/excon_subscriber.rb,
lib/airbrake/rails/action_controller.rb,
lib/airbrake/rails/backtrace_cleaner.rb,
lib/airbrake/rails/railties/middleware_tie.rb,
lib/airbrake/rails/active_record_subscriber.rb,
lib/airbrake/rails/railties/active_record_tie.rb,
lib/airbrake/rails/action_cable/notify_callback.rb,
lib/airbrake/rails/railties/action_controller_tie.rb,
lib/airbrake/rails/action_controller_route_subscriber.rb,
lib/airbrake/rails/action_controller_notify_subscriber.rb,
lib/airbrake/rails/action_controller_performance_breakdown_subscriber.rb

Overview

Rails namespace holds all Rails-related functionality.

Defined Under Namespace

Modules: ActionCable, ActionController, ActiveJob, ActiveRecord, CurlEasy, CurlMulti, HTTP, HTTPClient, NetHttp, Railties, TyphoeusRequest Classes: ActionControllerNotifySubscriber, ActionControllerPerformanceBreakdownSubscriber, ActionControllerRouteSubscriber, ActiveRecordSubscriber, App, BacktraceCleaner, Event, Excon, Railtie

Class Method Summary collapse

Class Method Details

.loggerObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/airbrake/rails.rb', line 8

def self.logger
  # Rails.logger is not set in some Rake tasks such as
  # 'airbrake:deploy'. In this case we use a sensible fallback.
  level = (::Rails.logger ? ::Rails.logger.level : Logger::ERROR)

  if ENV['RAILS_LOG_TO_STDOUT'].present?
    Logger.new($stdout, level: level)
  else
    Logger.new(::Rails.root.join('log', 'airbrake.log'), level: level)
  end
end