-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
port deep parameter logging from Badiapp/grape_logging #37
Conversation
@aserafin Is there any chance of getting this PR merged and a new gem built? |
def safe_parameters(request) | ||
# Now this logger can work also over Rails requests | ||
return clean_parameters(request.env[AD_PARAMS] || {}) if request.params.empty? | ||
clean_parameters(request.params.clone) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at ParameterFilter
class I don't think we need to clone parameters anymore, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we also do if ... else ... end
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☑️ Done and done.
hey @jason-uh - sorry it took so long and thanks for contribution, especially the tests 💪 could you take a look at two notes I left? |
Thanks @aserafin. |
@aserafin would you also publish a new version of the gem? Thanks. |
Awesome @aserafin. Thanks a bunch, and thanks to @oricodes89 from @Badiapp for the initial code. |
Thanks to @dsantosmerino! @Badiapp is happy to help. |
This ports deep parameter logging from Badiapp/grape_logging without having to depend upon Rails directly (lifts the
ParameterFilter
from Rails, or uses it indirectly if Rails is available). I also started to add some specs.