Permalink
Browse files

Ticket 2263 - Make clean logger compatible with both 1.8.2 and 1.8.3

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2369 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 5640773 commit fe0ffe406e831378a2864a706e9648b05023df1e @jeremy jeremy committed Sep 27, 2005
Showing with 12 additions and 3 deletions.
  1. +2 −0 activesupport/CHANGELOG
  2. +10 −3 activesupport/lib/active_support/clean_logger.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* Clean logger is compatible with both 1.8.2 and 1.8.3 Logger. #2263 [Michael Schuerig <michael@schuerig.de>]
+
* Added native, faster implementations of .blank? for the core types #2286 [skae]
* Fixed clean logger to work with Ruby 1.8.3 Logger class #2245
@@ -10,7 +10,14 @@ def silence(temporary_level = Logger::ERROR)
end
private
- def format_message(severity, timestamp, msg, progname)
- "#{msg}\n"
+ # Ruby 1.8.3 swapped the format_message params.
+ if RUBY_VERSION < '1.8.3'
+ def format_message(severity, timestamp, msg, progname)
+ "#{msg}\n"
+ end
+ else
+ def format_message(severity, timestamp, progname, msg)
+ "#{msg}\n"
+ end
end
-end
+end

0 comments on commit fe0ffe4

Please sign in to comment.