Class: Namira::Middleware::Logger
- Inherits:
-
Object
- Object
- Namira::Middleware::Logger
- Defined in:
- lib/namira/middleware/logger.rb
Overview
Performs request logging
Constant Summary collapse
- SKIP_LOGGING_KEY =
The key that will disable logging
:skip_logging
Instance Method Summary collapse
-
#call(env) ⇒ Object
Called by the middleware runner.
-
#initialize(app) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(app) ⇒ Logger
Returns a new instance of Logger.
10 11 12 |
# File 'lib/namira/middleware/logger.rb', line 10 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
Called by the middleware runner.
18 19 20 21 |
# File 'lib/namira/middleware/logger.rb', line 18 def call(env) log_request(env) @app.call(env) end |