aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/rack/logger.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-06-07 15:44:57 +0200
committerXavier Noria <fxn@hashref.com>2010-06-07 15:44:57 +0200
commit9e065c6bc175621ad30a416c8c4345f95ce3c264 (patch)
tree505df4243727a00d1f030205f2e64afe0d098e5e /railties/lib/rails/rack/logger.rb
parent0dbc732995a526354fb1e3c732af5dacdb863dda (diff)
parent1a8f784a236058101c6e8b6387aefc96e86a1e54 (diff)
downloadrails-9e065c6bc175621ad30a416c8c4345f95ce3c264.tar.gz
rails-9e065c6bc175621ad30a416c8c4345f95ce3c264.tar.bz2
rails-9e065c6bc175621ad30a416c8c4345f95ce3c264.zip
Merge remote branch 'rails/master'
Diffstat (limited to 'railties/lib/rails/rack/logger.rb')
-rw-r--r--railties/lib/rails/rack/logger.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/rails/rack/logger.rb b/railties/lib/rails/rack/logger.rb
index dd8b342f59..73e9af3b41 100644
--- a/railties/lib/rails/rack/logger.rb
+++ b/railties/lib/rails/rack/logger.rb
@@ -1,4 +1,5 @@
require 'rails/log_subscriber'
+require 'active_support/core_ext/time/conversions'
module Rails
module Rack
@@ -19,10 +20,10 @@ module Rails
def before_dispatch(env)
request = ActionDispatch::Request.new(env)
- path = request.fullpath.inspect rescue "unknown"
+ path = request.fullpath
- info "\n\nStarted #{request.method.to_s.upcase} #{path} " <<
- "for #{request.remote_ip} at #{Time.now.to_s(:db)}"
+ info "\n\nStarted #{env["REQUEST_METHOD"]} \"#{path}\" " \
+ "for #{request.ip} at #{Time.now.to_default_s}"
end
def after_dispatch(env)