Michael Koziarski wrote:
>> You can go read his rant, so I don't have to repeat it all. Please fix
>> this bug in some sustainable way. Thanks for listening.
>
> You clearly feel quite strongly about this issue, but I feel I need to
> remind you that rails is an open source project, and you're free to
> send patches. Rather than sending an angry email, you could have
> taken all this passion, fixed the problem, and sent us a patch to fix
> it.
>
> I can see how this code can be frustrating, but the best way to make
> sure the fix meets your requirements, is to provide it yourself.
Well, I don't feel strongly about it and I have already wasted way too
much time on tracking this down. If people wonder how they can undo the
damage your monkey-patching inflicts on Logger: In my application I have
reversed it by doing this:
require 'active_support/clean_logger'
class Logger
alias format_message old_format_message
end
Here's the offending code in active_support/clean_logger.rb:
class Logger #:nodoc:
[...]
private
alias old_format_message format_message
# Ruby 1.8.3 transposed the msg and progname arguments to
format_message.
# We can't test RUBY_VERSION because some distributions don't keep Ruby
# and its standard library in sync, leading to installations of
Ruby 1.8.2
# with Logger from 1.8.3 and vice versa.
if method_defined?(:formatter=)
def format_message(severity, timestamp, progname, msg)
"#{msg}\n"
end
else
def format_message(severity, timestamp, msg, progname)
"#{msg}\n"
end
end
end
------------------------------------------------------------------------
BTW: This practice already broke Rails on the newly released Ruby 1.8.3
in the past. I hope for you that it won't happen again in the future.
Good luck!
--
Florian Frank
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---