From 3c2bd1a541fc6719e4b8371a65249f38a7497adb Mon Sep 17 00:00:00 2001 From: Florent Beaurain Date: Thu, 17 Oct 2024 00:49:33 +0200 Subject: [PATCH] easier --- activesupport/lib/active_support/log_subscriber.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/activesupport/lib/active_support/log_subscriber.rb b/activesupport/lib/active_support/log_subscriber.rb index 2b7031efc10c..e5ce0b6ad35d 100644 --- a/activesupport/lib/active_support/log_subscriber.rb +++ b/activesupport/lib/active_support/log_subscriber.rb @@ -139,10 +139,6 @@ def logger LogSubscriber.logger end - def error_reporter - ActiveSupport.error_reporter - end - def silenced?(event) logger.nil? || @event_levels[event]&.call(logger) end @@ -188,7 +184,7 @@ def mode_from(options) end def log_exception(name, e) - error_reporter.report(e) + ActiveSupport.error_reporter.report(e) if logger logger.error "Could not log #{name.inspect} event. #{e.class}: #{e.message} #{e.backtrace}"