lib/locomotive/steam/middlewares/logging.rb in locomotivecms_steam-1.6.0.rc1 vs lib/locomotive/steam/middlewares/logging.rb in locomotivecms_steam-1.6.0

- old
+ new

@@ -12,13 +12,11 @@ def call(env) now = Time.now log "Started #{env['REQUEST_METHOD'].upcase} \"#{env['PATH_INFO']}\" at #{now}".light_white, 0 - if Locomotive::Steam.configuration.mode == :test - log "Params: #{env.fetch('steam.request').params.inspect}" - end - + debug_log "Params: #{env.fetch('steam.request').params.inspect}" + app.call(env).tap do |response| done_in_ms = ((Time.now - now) * 10000).truncate / 10.0 log "Completed #{code_to_human(response.first)} in #{done_in_ms}ms\n\n".green end end