Skip to content

Commit

Permalink
Some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Elad Meidar committed Apr 23, 2011
1 parent 975db55 commit c7c7736
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/rack/contrib/deflect.rb
Expand Up @@ -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?
Expand Down

0 comments on commit c7c7736

Please sign in to comment.