Skip to content
Browse files

Some logging

  • Loading branch information...
1 parent 975db55 commit c7c7736bd4b625702c2869dd7febef6d32c08347 @eladmeidar committed Apr 23, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/rack/contrib/deflect.rb
View
7 lib/rack/contrib/deflect.rb
@@ -124,9 +124,14 @@ def clear!
@remote_addr_map.delete @remote_addr
end
+ def rails_logger(message)
+ RAILS_DEFAULT_LOGGER.info "Rack::Deflect = #{message}"
+ end
+
def increment_requests
map[:requests] += 1
- map[:request_uris] << @env["REQUEST_URI"]
+ rails_logger "Current Request: #{@env["REQUEST_URI"]}"
+ map[:request_uris] = map[:request_uris] << @env["REQUEST_URI"]
end
def exceeded_request_threshold?

0 comments on commit c7c7736

Please sign in to comment.
Something went wrong with that request. Please try again.