Class: Magpie::Mothlog
- Inherits:
-
Object
- Object
- Magpie::Mothlog
- Defined in:
- lib/middles/mothlog.rb
Constant Summary
- FORMAT =
%{%s : "%s" \n}
- FORMAT_NOTIFY =
%{\t[%s] %s at[%s] (%0.4fms)\nParameters:%s\nResult:%s\n}
Instance Method Summary (collapse)
- - (Object) call(env)
-
- (Mothlog) initialize(app, logger = nil)
constructor
A new instance of Mothlog.
Constructor Details
- (Mothlog) initialize(app, logger = nil)
A new instance of Mothlog
8 9 10 11 |
# File 'lib/middles/mothlog.rb', line 8 def initialize(app, logger=nil) @app = app @logger = logger end |
Instance Method Details
- (Object) call(env)
13 14 15 16 17 |
# File 'lib/middles/mothlog.rb', line 13 def call(env) status, header, body = @app.call(env) log(env) [status, header, body] end |