aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-06-16 13:36:04 -0400
committerGitHub <noreply@github.com>2017-06-16 13:36:04 -0400
commit9cf7217909c30e5513f668e5c8aa105b04ba35fd (patch)
tree76fd8a016fbf7b59834819396f24d7c0496b2276 /activesupport
parent6bb7d50dece5d02540e5c420f63478185102fd70 (diff)
parent1c5f5af8c92286ce3f5cb03379098249432faafd (diff)
downloadrails-9cf7217909c30e5513f668e5c8aa105b04ba35fd.tar.gz
rails-9cf7217909c30e5513f668e5c8aa105b04ba35fd.tar.bz2
rails-9cf7217909c30e5513f668e5c8aa105b04ba35fd.zip
Merge pull request #29140 from notEthan/log_subscribed_avoid_rescuing
Log subscriber - avoid rescuing certain exceptions
Diffstat (limited to 'activesupport')
-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