diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-25 19:52:19 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-25 19:52:19 -0300 |
commit | 026ce5ddf11c4cda0aae7f33a9266e54117db318 (patch) | |
tree | 77874553d9f16141353af742075e85e6dbca3b25 /activerecord | |
parent | 6f0a69c5899ebdc892e2aa23e68e2604fa70fb73 (diff) | |
parent | 608683745fdd1286488417011db57f25d541226d (diff) | |
download | rails-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.rb | 3 |
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 |