Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make open_log private

  • Loading branch information...
commit 2649db79797a5c8d3055ed5db5e8f567a2ee3a5e 1 parent 79abb70
@tenderlove tenderlove authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 activesupport/lib/active_support/buffered_logger.rb
View
16 activesupport/lib/active_support/buffered_logger.rb
@@ -55,13 +55,6 @@ def initialize(log, level = DEBUG)
end
end
- def open_log(log, mode)
- open(log, mode).tap do |log|
- log.set_encoding(Encoding::BINARY) if log.respond_to?(:set_encoding)
- log.sync = true
- end
- end
-
def add(severity, message = nil, progname = nil, &block)
return if @level > severity
message = (message || (block && block.call) || progname).to_s
@@ -133,5 +126,14 @@ def buffer
def clear_buffer
@buffer.delete(Thread.current)
end
+
+ private
+
+ def open_log(log, mode)
+ open(log, mode).tap do |log|
+ log.set_encoding(Encoding::BINARY) if log.respond_to?(:set_encoding)
+ log.sync = true
+ end
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.