Skip to content

Commit

Permalink
replace condition with log level
Browse files Browse the repository at this point in the history
  • Loading branch information
tycooon committed Feb 10, 2023
1 parent 63c9be8 commit 22fc7ce
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ class DebugExceptions

undef_method :log_error
def log_error(request, wrapper)
return if !log_rescued_responses?(request) && wrapper.rescue_response?

ActiveSupport::Deprecation.silence do
ActionController::Base.logger.fatal(wrapper.exception)
level = wrapper.rescue_response? ? :debug : :fatal
ActionController::Base.logger.log(level, wrapper.exception)
end
end
end
Expand Down

0 comments on commit 22fc7ce

Please sign in to comment.