aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/log_subscriber.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/log_subscriber.rb')
-rw-r--r--activesupport/lib/active_support/log_subscriber.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/log_subscriber.rb b/activesupport/lib/active_support/log_subscriber.rb
index e533c6662e..a05758d6aa 100644
--- a/activesupport/lib/active_support/log_subscriber.rb
+++ b/activesupport/lib/active_support/log_subscriber.rb
@@ -80,8 +80,10 @@ module ActiveSupport
def finish(name, id, payload)
super if logger
- rescue Exception => e
- logger.error "Could not log #{name.inspect} event. #{e.class}: #{e.message} #{e.backtrace}"
+ rescue => e
+ if logger
+ logger.error "Could not log #{name.inspect} event. #{e.class}: #{e.message} #{e.backtrace}"
+ end
end
private