reidmorrison / rails_semantic_logger

Rails Semantic Logger replaces the Rails default logger with Semantic Logger
https://logger.rocketjob.io/rails
Apache License 2.0
320 stars 114 forks source link

Fix log level for exceptions rescued by Rails #179

Open tycooon opened 1 year ago

tycooon commented 1 year ago

The original version is skipping the log if the exception is rescued by Rails. I decided to still log those exceptions but with lower level (debug instead of fatal). I think this is still better than the current behavior.

reidmorrison commented 1 year ago

Looks like the rescue_response? code was added as of Rails 7, how will this work with Rails 5 & 6?

tycooon commented 1 year ago

You are correct. I guess I can throw in a wrapper.respond_to?(:rescue_response?) check if that would be OK.