Changeset 1246
- Timestamp:
- 01/09/08 18:55:43 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/jerbivore/lib/jerbivore/servlet_handler.rb
r892 r1246 20 20 21 21 request = ServletHandler::Request.new(servlet_request, input) 22 M ERB_LOGGER.info("\nRequest: REQUEST_URI: #{servlet_request.getRequestURI} (#{Time.now.strftime("%Y-%m-%d %H:%M:%S")})")22 Merb.logger.info("\nRequest: REQUEST_URI: #{servlet_request.getRequestURI} (#{Time.now.strftime("%Y-%m-%d %H:%M:%S")})") 23 23 24 24 if @@path_prefix 25 25 if request.params['REQUEST_URI'] =~ @@path_prefix 26 M ERB_LOGGER.info("Path prefix #{@@path_prefix.inspect} removed from PATH_INFO and REQUEST_URI")26 Merb.logger.info("Path prefix #{@@path_prefix.inspect} removed from PATH_INFO and REQUEST_URI") 27 27 request.params['REQUEST_URI'].sub!(@@path_prefix, '') 28 28 request.params['PATH_INFO'].sub!(@@path_prefix, '') … … 37 37 benchmarks[:action] = action 38 38 39 M ERB_LOGGER.info("Routing to controller: #{controller.class} action: #{action}\nRoute Recognition & Parsing HTTP Input took: #{benchmarks[:setup_time]} seconds")39 Merb.logger.info("Routing to controller: #{controller.class} action: #{action}\nRoute Recognition & Parsing HTTP Input took: #{benchmarks[:setup_time]} seconds") 40 40 41 41 # TODO: handle X-SENDFILE … … 51 51 total_request_time = Time.now - start 52 52 benchmarks[:total_request_time] = total_request_time 53 M ERB_LOGGER.info("Request Times: #{benchmarks.inspect}\nResponse status: #{servlet_response.status}\nComplete Request took: #{total_request_time} seconds, #{1.0/total_request_time} Requests/Second\n\n")53 Merb.logger.info("Request Times: #{benchmarks.inspect}\nResponse status: #{servlet_response.status}\nComplete Request took: #{total_request_time} seconds, #{1.0/total_request_time} Requests/Second\n\n") 54 54 rescue Object => e 55 55 servlet_response.setStatus(500) 56 56 output.write("500 Internal Server Error") 57 57 output.flush 58 M ERB_LOGGER.error(Merb.exception(e))58 Merb.logger.error(Merb.exception(e)) 59 59 ensure 60 M ERB_LOGGER.flush60 Merb.logger.flush 61 61 end 62 62 end
