lib/good_job/cli.rb in good_job-3.12.8 vs lib/good_job/cli.rb in good_job-3.13.0

- old
+ new

@@ -146,10 +146,13 @@ # # GoodJob components that need access to constants, classes, etc. from # Rails or from the application can be set up here. def set_up_application! require RAILS_ENVIRONMENT_RB - return if !GoodJob::CLI.log_to_stdout? || ActiveSupport::Logger.logger_outputs_to?(GoodJob.logger, $stdout) + return unless GoodJob::CLI.log_to_stdout? + + $stdout.sync = true + return if ActiveSupport::Logger.logger_outputs_to?(GoodJob.logger, $stdout) GoodJob::LogSubscriber.loggers << ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new($stdout)) GoodJob::LogSubscriber.reset_logger end end