Skip to content
Browse files

Merge pull request #214 from toddtomkinson/release-1.2

Change to support multiple threads in jruby--fixes github issue #188
  • Loading branch information...
2 parents 8510666 + 4329a90 commit efa363cd9bf11bea6c06b7beb3214d83f1950f05 @dkubb dkubb committed Aug 27, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/dm-core/support/logger.rb
View
4 lib/dm-core/support/logger.rb
@@ -124,7 +124,9 @@ def set_log(log, log_level = nil, delimiter = " ~ ", auto_flush = false)
# Flush the entire buffer to the log object.
def flush
return unless @buffer.size > 0
- @log.write(@buffer.slice!(0..-1).join)
+ to_flush = @buffer
+ @buffer = []
+ @log.write(to_flush.join)
end
# Close and remove the current log object.

0 comments on commit efa363c

Please sign in to comment.
Something went wrong with that request. Please try again.