# application.rb:
config.exceptions_app = lambda do |env|
exception = env['action_dispatch.exception']
params = env['action_dispatch.request.parameters']
request = Rack::Request.new(env)
status_code = ActionDispatch::ExceptionWrapper.new(env, exception).status_code
Rails.logger.info [
"Exception: #{exception}",
"fullpath=#{request.fullpath}",
"params=#{params}"
].join(" - ")
end
Last active
March 30, 2018 22:38
-
-
Save jsimpson/9ff223fb6947f7e07c26d2186bebf927 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment