It is possible with monkey patching by creating an initializer like this:

class Rails::Rack::Logger < ActiveSupport::LogSubscriber
  protected

  def before_dispatch(env)
    request = ActionDispatch::Request.new(env)
    info "\n\nStarted #{request.request_method} \"#{request.url}\" for 
#{request.ip} at #{Time.now.to_default_s}"
  end
end

Would there be any interest in having something like this, configurable, in 
Rails? (I did patches for Rails that never managed to gather enough 
popularity and were ignored, I'm not wasting my time again)

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/azy80IMf8-cJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to