lib/deas/logging.rb in deas-0.42.0 vs lib/deas/logging.rb in deas-0.43.0
- old
+ new
@@ -2,12 +2,12 @@
require 'sinatra/base'
module Deas
module Logging
- def self.middleware(verbose)
- verbose ? VerboseLogging : SummaryLogging
+ def self.middleware_args(verbose)
+ verbose ? [VerboseLogging] : [SummaryLogging]
end
end
class BaseLogging
@@ -100,10 +100,11 @@
request = Rack::Request.new(env)
line_attrs = {
'method' => request.request_method,
'path' => request.path,
'params' => env['deas.params'],
+ 'splat' => env['deas.splat'],
'time' => env['deas.time_taken'],
'status' => status
}
if env['deas.handler_class']
line_attrs['handler'] = env['deas.handler_class'].name
@@ -117,10 +118,10 @@
end
module SummaryLine
def self.keys
- %w{time status method path handler params redir}
+ %w{time status method path handler params splat redir}
end
def self.new(line_attrs)
self.keys.select{ |k| line_attrs.key?(k) }.
map{ |k| "#{k}=#{line_attrs[k].inspect}" }.
join(' ')