Closed ball-hayden closed 3 years ago
Let's try this patch, we can always undo the changes later if we find there is value in logging parts of the request or response objects from the payload.
Can you try Rails Semantic Logger from master and let me know if we need anything else fixed in the Rails monkey patching code?
Can you try Rails Semantic Logger from master and let me know if we need anything else fixed in the Rails monkey patching code?
We're running this branch in production now and haven't found any notable issues, but I'll keep an eye out 👍
Follow on from https://github.com/rocketjob/rails_semantic_logger/pull/110
Description of changes
This avoids infinite recursion while trying to serialise Request and Response objects.
I'm not 100% comfortable with this, but neither
ActionDispatch::Request
norActionDispatch::Response
objects can be serialised withto_json
under Rails 6.1.rc1.This work-around is possibly a bit too much of a hammer?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.