Class: Timber::Integrations::Rails::RackLogger
- Inherits:
-
Integrator
- Object
- Integrator
- Timber::Integrations::Rails::RackLogger
- Defined in:
- lib/timber-rails/rack_logger.rb
Overview
Disables the default rail’s rack logging. Note, we cannot simply uninstall this rack middleware because rails couples this with ActiveSupport instrumentation. As such, we simply disable the logger and let our Rack middleware handle the logging.
Defined Under Namespace
Modules: InstanceMethods
Instance Method Summary collapse
-
#initialize ⇒ RackLogger
constructor
A new instance of RackLogger.
- #integrate! ⇒ Object
Constructor Details
#initialize ⇒ RackLogger
Returns a new instance of RackLogger.
44 45 46 47 48 |
# File 'lib/timber-rails/rack_logger.rb', line 44 def initialize require "rails/rack/logger" rescue LoadError => e raise RequirementNotMetError.new(e.) end |
Instance Method Details
#integrate! ⇒ Object
50 51 52 53 54 |
# File 'lib/timber-rails/rack_logger.rb', line 50 def integrate! return true if ::Rails::Rack::Logger.include?(InstanceMethods) ::Rails::Rack::Logger.send(:include, InstanceMethods) end |