1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #37729 from anderscarling/patch-1

Respect config.log_level in console
This commit is contained in:
Kasper Timm Hansen 2020-02-13 18:36:44 +01:00 committed by GitHub
commit d632a51bfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,6 +59,7 @@ module ActiveRecord
require "active_record/base" require "active_record/base"
unless ActiveSupport::Logger.logger_outputs_to?(Rails.logger, STDERR, STDOUT) unless ActiveSupport::Logger.logger_outputs_to?(Rails.logger, STDERR, STDOUT)
console = ActiveSupport::Logger.new(STDERR) console = ActiveSupport::Logger.new(STDERR)
console.level = Rails.logger.level
Rails.logger.extend ActiveSupport::Logger.broadcast console Rails.logger.extend ActiveSupport::Logger.broadcast console
end end
ActiveRecord::Base.verbose_query_logs = false ActiveRecord::Base.verbose_query_logs = false