diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-13 00:41:04 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-13 01:19:23 +0100 |
commit | da5978c22374b8a3b15a421ff4920e0940435253 (patch) | |
tree | e9a94394f0ce7455cd0f955ede80e0b5f5f573b0 /actionpack/lib/action_controller/metal/streaming.rb | |
parent | 8d78a82d797bf8809acb1d2ebb30cf81488ac99c (diff) | |
download | rails-da5978c22374b8a3b15a421ff4920e0940435253.tar.gz rails-da5978c22374b8a3b15a421ff4920e0940435253.tar.bz2 rails-da5978c22374b8a3b15a421ff4920e0940435253.zip |
Add subscriber for ActionPack and move all logging inside it.
Diffstat (limited to 'actionpack/lib/action_controller/metal/streaming.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/streaming.rb | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/streaming.rb b/actionpack/lib/action_controller/metal/streaming.rb index 288b5d7c99..8f03b8bb17 100644 --- a/actionpack/lib/action_controller/metal/streaming.rb +++ b/actionpack/lib/action_controller/metal/streaming.rb @@ -88,13 +88,11 @@ module ActionController #:nodoc: @performed_render = false if options[:x_sendfile] - logger.info "Sending #{X_SENDFILE_HEADER} header #{path}" if logger head options[:status], X_SENDFILE_HEADER => path else if options[:stream] # TODO : Make render :text => proc {} work with the new base render :status => options[:status], :text => Proc.new { |response, output| - logger.info "Streaming file #{path}" unless logger.nil? len = options[:buffer_size] || 4096 File.open(path, 'rb') do |file| while buf = file.read(len) @@ -103,7 +101,6 @@ module ActionController #:nodoc: end } else - logger.info "Sending file #{path}" unless logger.nil? File.open(path, 'rb') { |file| render :status => options[:status], :text => file.read } end end @@ -141,7 +138,6 @@ module ActionController #:nodoc: # data to the browser, then use <tt>render :text => proc { ... }</tt> # instead. See ActionController::Base#render for more information. def send_data(data, options = {}) #:doc: - logger.info "Sending data #{options[:filename]}" if logger send_file_headers! options.merge(:length => data.bytesize) render :status => options[:status], :text => data end |