Skip to content

Commit 22fc7ce

Browse files
committed
replace condition with log level
1 parent 63c9be8 commit 22fc7ce

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/rails_semantic_logger/extensions/action_dispatch/debug_exceptions.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ class DebugExceptions
77

88
undef_method :log_error
99
def log_error(request, wrapper)
10-
return if !log_rescued_responses?(request) && wrapper.rescue_response?
11-
1210
ActiveSupport::Deprecation.silence do
13-
ActionController::Base.logger.fatal(wrapper.exception)
11+
level = wrapper.rescue_response? ? :debug : :fatal
12+
ActionController::Base.logger.log(level, wrapper.exception)
1413
end
1514
end
1615
end

0 commit comments

Comments
 (0)