Open ilyadoroshin opened 9 years ago
FYI, this helped me to fix my problem.
// config/initializers/react_rails_hot_loader.rb
if Rails.env.development?
React::Rails::HotLoader.class_eval do
def self.log(message)
msg = "[HotLoader] #{message}"
::Rails.logger.info(msg)
::Rails.logger.try(:flush)
end
end
React::Rails::HotLoader.start()
end
Thanks for the heads up!
Yeah, I used my own logger so I could modify all messages in one place, turn them off and on, etc.
Thanks for sharing your fix, I'll take a look at the changes in edge Rails and see what's a good long term solution
@rmosolgo :+1:
Hello, guys!
First of all, wanted to say thanks for that gem, works great! But I've found an issue: React::Rails::HotLoader.log: No flush method for Rails.logger in edge rails
For some reason, you decided to render all errors through your own method, which ends up running ::Rails.logger.flush, that is not available (at least in rails 4.1.6)