Skip to content

Commit 4edfdf1

Browse files
PetrHeinzst0012
andauthored
Avoid invoking ActiveSupport::BroadcastLogger if not defined (#2169)
* Avoid instantiating BroadcastLogger if not defined * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: Stan Lo <stan001212@gmail.com>
1 parent c7c8e5b commit 4edfdf1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
### Bug Fixes
1616

1717
- Fixed a deprecation in `sidekiq-ruby` error handler [#2160](https://github.com/getsentry/sentry-ruby/pull/2160)
18+
- Avoid invoking ActiveSupport::BroadcastLogger if not defined [#2169](https://github.com/getsentry/sentry-ruby/pull/2169)
1819

1920
## 5.13.0
2021

sentry-rails/lib/sentry/rails/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Configuration
1212
@excluded_exceptions = @excluded_exceptions.concat(Sentry::Rails::IGNORE_DEFAULT)
1313

1414
if ::Rails.logger
15-
if ::Rails.logger.respond_to?(:broadcasts)
15+
if defined?(::ActiveSupport::BroadcastLogger) && ::Rails.logger.is_a?(::ActiveSupport::BroadcastLogger)
1616
dupped_broadcasts = ::Rails.logger.broadcasts.map(&:dup)
1717
@logger = ::ActiveSupport::BroadcastLogger.new(*dupped_broadcasts)
1818
else

0 commit comments

Comments
 (0)