diff options
author | Max Shytikov <mshytikov@gmail.com> | 2013-07-30 18:25:00 +0300 |
---|---|---|
committer | Max Shytikov <mshytikov@gmail.com> | 2013-07-30 18:25:00 +0300 |
commit | e2180e84a96632e16c37be165efeab3cbf8c7244 (patch) | |
tree | fddc2bf017f7886b4076e24a194ed3d9d4612c4d /railties/lib | |
parent | 77cf5cfc744b7c68559fa4b342c0f8bd04364c15 (diff) | |
download | rails-e2180e84a96632e16c37be165efeab3cbf8c7244.tar.gz rails-e2180e84a96632e16c37be165efeab3cbf8c7244.tar.bz2 rails-e2180e84a96632e16c37be165efeab3cbf8c7244.zip |
Rails.logger should have level specified by config.log_level.
Fix bug when log level of Rails.logger (which was set via config.logger) does not match the config.log_level.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application/bootstrap.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index 62d57c0cc6..a26d41c0cf 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -42,7 +42,6 @@ INFO logger = ActiveSupport::Logger.new f logger.formatter = config.log_formatter logger = ActiveSupport::TaggedLogging.new(logger) - logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase) logger rescue StandardError logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDERR)) @@ -53,6 +52,8 @@ INFO ) logger end + + Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase) end # Initialize cache early in the stack so railties can make use of it. |