Class: SweetLogger::Middleware
- Inherits:
-
Rails::Rack::Logger
- Object
- Rails::Rack::Logger
- SweetLogger::Middleware
- Defined in:
- lib/sweet_logger/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(*args, &block) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(*args, &block) ⇒ Middleware
Returns a new instance of Middleware.
7 8 9 10 11 |
# File 'lib/sweet_logger/middleware.rb', line 7 def initialize(*args, &block) super @logstash = SweetLogger::Logstash.new end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 |
# File 'lib/sweet_logger/middleware.rb', line 13 def call(env) @logstash.wrap env['PATH_INFO'] do super env end end |