Class: RailsCustomLogging::Rack::Logger
- Inherits:
-
Object
- Object
- RailsCustomLogging::Rack::Logger
- Defined in:
- lib/rails_custom_logging/rails_ext/rack/logger.rb
Overview
Replaces ‘Rails::Rack::Logger` middleware with this one to avoid pesky Rack logs lines like `Started GET /`.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(app) ⇒ Logger
Returns a new instance of Logger.
7 8 9 |
# File 'lib/rails_custom_logging/rails_ext/rack/logger.rb', line 7 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 |
# File 'lib/rails_custom_logging/rails_ext/rack/logger.rb', line 11 def call(env) @app.call(env) ensure ::ActiveSupport::LogSubscriber.flush_all! end |