diff --git a/Gemfile.lock b/Gemfile.lock index 7b1b28bfeb3..f8d5a2ed9b3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -186,7 +186,7 @@ GEM logstash-event (1.2.02) logstash-logger (0.26.1) logstash-event (~> 1.2) - logster (2.1.0) + logster (2.1.1) loofah (2.2.3) crass (~> 1.0.2) nokogiri (>= 1.5.9) diff --git a/config/initializers/100-logster.rb b/config/initializers/100-logster.rb index 1ef50d23609..21ef01a127c 100644 --- a/config/initializers/100-logster.rb +++ b/config/initializers/100-logster.rb @@ -1,3 +1,12 @@ +if Rails.env.development? && RUBY_VERSION.match?(/^2\.5\.[23]/) + STDERR.puts "WARNING: Discourse development environment runs slower on Ruby 2.5.3 or below" + STDERR.puts "We recommend you upgrade to Ruby 2.6.1 for the optimal development performance" + + # we have to used to older and slower version of the logger cause the new one exposes a Ruby bug in + # the Queue class which causes segmentation faults + Logster::Scheduler.disable +end + if Rails.env.development? && !Sidekiq.server? && ENV["RAILS_LOGS_STDOUT"] == "1" console = ActiveSupport::Logger.new(STDOUT) original_logger = Rails.logger.chained.first