Closed Cervajz closed 5 years ago
@radar It's strange that ActiveSupport::Logger.logger_outputs_to?(::Rails.logger, STDERR, STDOUT)
does not work.
Or at least not in my case - I use RoR 5.2.1
and ROM together with AR as I am in the middle of migration.
ActiveRecord creates its own console output to STDERR and STDOUT and it looks like the #logger_outputs_to? does not catch that. The result is is having the log messages twice in rails console.
More info: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/railtie.rb#L58