From 608683745fdd1286488417011db57f25d541226d Mon Sep 17 00:00:00 2001 From: Jacob Evelyn Date: Mon, 2 Jun 2014 16:13:41 -0400 Subject: Use logger environment settings in Rails console. --- activerecord/lib/active_record/railtie.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index a4ceacbf44..bd09bbc705 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -60,6 +60,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 -- cgit v1.2.3