diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-07-29 20:01:25 +0200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-07-29 20:01:25 +0200 |
commit | d9452d3ab3063c5e96dfd80cf6056c49192081b3 (patch) | |
tree | b0aee3286fa2fd51a06b62720239bf9eac023528 | |
parent | a24398b64757df8c5939b07238c740bddfdab03e (diff) | |
download | rails-d9452d3ab3063c5e96dfd80cf6056c49192081b3.tar.gz rails-d9452d3ab3063c5e96dfd80cf6056c49192081b3.tar.bz2 rails-d9452d3ab3063c5e96dfd80cf6056c49192081b3.zip |
Remove incomplete non-blocking logger functionality
-rw-r--r-- | activesupport/lib/active_support/buffered_logger.rb | 14 | ||||
-rw-r--r-- | railties/lib/initializer.rb | 1 |
2 files changed, 1 insertions, 14 deletions
diff --git a/activesupport/lib/active_support/buffered_logger.rb b/activesupport/lib/active_support/buffered_logger.rb index aec416a6d6..cedc1afe7f 100644 --- a/activesupport/lib/active_support/buffered_logger.rb +++ b/activesupport/lib/active_support/buffered_logger.rb @@ -39,7 +39,6 @@ module ActiveSupport @level = level @buffer = [] @auto_flushing = 1 - @no_block = false @guard = Mutex.new if log.respond_to?(:write) @@ -55,12 +54,6 @@ module ActiveSupport end end - def set_non_blocking_io - if !RUBY_PLATFORM.match(/java|mswin/) && !(@log == STDOUT) && @log.respond_to?(:write_nonblock) - @no_block = true - end - end - def add(severity, message = nil, progname = nil, &block) return if @level > severity message = (message || (block && block.call) || progname).to_s @@ -105,12 +98,7 @@ module ActiveSupport unless buffer.empty? old_buffer = @buffer @buffer = [] - text_to_write = old_buffer.join - if @no_block - @log.write_nonblock(text_to_write) - else - @log.write(text_to_write) - end + @log.write(old_buffer.join) end end end diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 32411e8928..782fbebec2 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -408,7 +408,6 @@ Run `rake gems:install` to install the missing gems. logger.level = ActiveSupport::BufferedLogger.const_get(configuration.log_level.to_s.upcase) if configuration.environment == "production" logger.auto_flushing = false - logger.set_non_blocking_io end rescue StandardError => e logger = ActiveSupport::BufferedLogger.new(STDERR) |