aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/tagged_logging.rb1
-rw-r--r--activesupport/test/buffered_logger_test.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb
index c3c61e178e..0f3ac0c132 100644
--- a/activesupport/lib/active_support/tagged_logging.rb
+++ b/activesupport/lib/active_support/tagged_logging.rb
@@ -40,6 +40,7 @@ module ActiveSupport
def flush
@tags.delete(Thread.current)
+ @logger.flush if @logger.respond_to?(:flush)
end
def method_missing(method, *args)
diff --git a/activesupport/test/buffered_logger_test.rb b/activesupport/test/buffered_logger_test.rb
index c818235fc0..dfdf1b4023 100644
--- a/activesupport/test/buffered_logger_test.rb
+++ b/activesupport/test/buffered_logger_test.rb
@@ -43,6 +43,7 @@ class BufferedLoggerTest < Test::Unit::TestCase
def test_write_binary_data_create_file
fname = File.join Dir.tmpdir, 'lol', 'rofl.log'
+ FileUtils.mkdir_p File.dirname(fname)
f = File.open(fname, 'w')
f.binmode