1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #29140 from notEthan/log_subscribed_avoid_rescuing

Log subscriber - avoid rescuing certain exceptions
This commit is contained in:
Rafael França 2017-06-16 13:36:04 -04:00 committed by GitHub
commit 9cf7217909

View file

@ -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