lib/locomotive/steam/middlewares/logging.rb in locomotivecms_steam-1.5.3 vs lib/locomotive/steam/middlewares/logging.rb in locomotivecms_steam-1.6.0.beta1
- old
+ new
@@ -11,10 +11,13 @@
def call(env)
now = Time.now
log "Started #{env['REQUEST_METHOD'].upcase} \"#{env['PATH_INFO']}\" at #{now}".light_white, 0
- log "Params: #{env.fetch('steam.request').params.inspect}"
+
+ if Locomotive::Steam.configuration.mode == :test
+ log "Params: #{env.fetch('steam.request').params.inspect}"
+ end
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