aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/buffered_logger.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-07-29 20:01:25 +0200
committerMichael Koziarski <michael@koziarski.com>2008-07-29 20:01:25 +0200
commitd9452d3ab3063c5e96dfd80cf6056c49192081b3 (patch)
treeb0aee3286fa2fd51a06b62720239bf9eac023528 /activesupport/lib/active_support/buffered_logger.rb
parenta24398b64757df8c5939b07238c740bddfdab03e (diff)
downloadrails-d9452d3ab3063c5e96dfd80cf6056c49192081b3.tar.gz
rails-d9452d3ab3063c5e96dfd80cf6056c49192081b3.tar.bz2
rails-d9452d3ab3063c5e96dfd80cf6056c49192081b3.zip
Remove incomplete non-blocking logger functionality
Diffstat (limited to 'activesupport/lib/active_support/buffered_logger.rb')
-rw-r--r--activesupport/lib/active_support/buffered_logger.rb14
1 files changed, 1 insertions, 13 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