Defect #19405
Setting config.logger.level in additional_environment.rb has no effect
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 0% | ||
Category: | Rails support | |||
Target version: | 3.0.2 | |||
Resolution: | Fixed | Affected version: | 3.0.1 |
Description
Since version 3.0.0 my production log files contain INFO messages and higher, despite setting a Logger level of ::WARN
in additional_environment.rb
.
Using the advice provided in RedmineInstall my config/additional_environment.rb
contains the following two lines:
config.logger = Logger.new(Rails.root.join("log",Rails.env + ".log"),3,5*1024*1024) config.logger.level = Logger::WARN
Environment:
Redmine version 3.0.1.stable Ruby version 2.2.1-p85 (2015-02-26) [x86_64-linux] Rails version 4.2.0 Environment production Database adapter PostgreSQL
Associated revisions
Fixed that setting config.logger.level in additional_environment.rb has no effect (#19405).
History
#1
Updated by Jean-Philippe Lang almost 6 years ago
- Category changed from Ruby support to Rails support
- Status changed from New to Confirmed
- Target version set to 3.0.2
Yes, this is due to r13899. The level set in environments/production.rb
takes precedence over config/application.rb and thus additional_environment.rb. As a workaround, you can set it environments/production.rb
.
#2
Updated by Jean-Philippe Lang almost 6 years ago
- Subject changed from config.logger.level in additional_environment.rb has no effect to Setting config.logger.level in additional_environment.rb has no effect
- Status changed from Confirmed to Resolved
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
Fixed in r14155.
#3
Updated by Jean-Philippe Lang almost 6 years ago
- Status changed from Resolved to Closed