File tree 1 file changed +4
-2
lines changed
lib/rails_semantic_logger/extensions/action_dispatch
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,15 @@ class DebugExceptions
9
9
if ( Rails ::VERSION ::MAJOR == 7 && Rails ::VERSION ::MINOR >= 1 ) || Rails ::VERSION ::MAJOR > 7
10
10
def log_error ( _request , wrapper )
11
11
Rails . application . deprecators . silence do
12
- ActionController ::Base . logger . fatal ( wrapper . exception )
12
+ level = wrapper . respond_to? ( :rescue_response? ) && wrapper . rescue_response? ? :debug : :fatal
13
+ ActionController ::Base . logger . log ( level , wrapper . exception )
13
14
end
14
15
end
15
16
else
16
17
def log_error ( _request , wrapper )
17
18
ActiveSupport ::Deprecation . silence do
18
- ActionController ::Base . logger . fatal ( wrapper . exception )
19
+ level = wrapper . respond_to? ( :rescue_response? ) && wrapper . rescue_response? ? :debug : :fatal
20
+ ActionController ::Base . logger . log ( level , wrapper . exception )
19
21
end
20
22
end
21
23
end
You can’t perform that action at this time.
0 commit comments