Skip to content

Commit 7c58911

Browse files
authored
Merge pull request rails#49721 from andrewn617/dont-overwrite-broadcast-loggers-broadcast-level-in-bootstrap-rb
Fix issue where `bootstrap.rb` overwrites the `level` of a `BroadcastLogger`'s `broadcasts`
2 parents f11c6ac + f212fb8 commit 7c58911

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

activesupport/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Fix issue where `bootstrap.rb` overwrites the `level` of a `BroadcastLogger`'s `broadcasts`.
2+
3+
*Andrew Novoselac*
4+
15
* Fix compatibility with the `semantic_logger` gem.
26

37
The `semantic_logger` gem doesn't behave exactly like stdlib logger in that

railties/lib/rails/application/bootstrap.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ module Bootstrap
5454
)
5555
logger
5656
end
57-
Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase)
5857

5958
unless Rails.logger.is_a?(ActiveSupport::BroadcastLogger)
59+
Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase)
6060
broadcast_logger = ActiveSupport::BroadcastLogger.new(Rails.logger)
6161
broadcast_logger.formatter = Rails.logger.formatter
6262
Rails.logger = broadcast_logger

0 commit comments

Comments
 (0)