aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-25 19:52:19 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-25 19:52:19 -0300
commit026ce5ddf11c4cda0aae7f33a9266e54117db318 (patch)
tree77874553d9f16141353af742075e85e6dbca3b25 /activerecord
parent6f0a69c5899ebdc892e2aa23e68e2604fa70fb73 (diff)
parent608683745fdd1286488417011db57f25d541226d (diff)
downloadrails-026ce5ddf11c4cda0aae7f33a9266e54117db318.tar.gz
rails-026ce5ddf11c4cda0aae7f33a9266e54117db318.tar.bz2
rails-026ce5ddf11c4cda0aae7f33a9266e54117db318.zip
Merge pull request #15476 from JacobEvelyn/master
Use logger environment settings in Rails console.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/railtie.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb
index f1bdbc845c..b6de90e89d 100644
--- a/activerecord/lib/active_record/railtie.rb
+++ b/activerecord/lib/active_record/railtie.rb
@@ -58,6 +58,9 @@ module ActiveRecord
require "active_record/railties/console_sandbox" if app.sandbox?
require "active_record/base"
console = ActiveSupport::Logger.new(STDERR)
+ console.formatter = Rails.logger.formatter
+ console.level = Rails.logger.level
+
Rails.logger.extend ActiveSupport::Logger.broadcast console
end