*looks around nervously*
controller.request.send(:filtered_query_string)
This is a private method, but using it will ensure that you don't log sensitive values in query params, such as token
, if your app uses them.
Edit: you could also use path: controller.request.filtered_path
, which includes the filtered query string.
Oh wow, good catch! Thanks so much! Although i don't think I have anything confidential in my own query string.
A bit unfortunate that's not a public method? Is there a filtered version of params
? Looks like request.filtered_parameters
? (edit, while filtered_query_string
isn't public, filtered_path
and filtered_parameters
are!)
This is why we post things on the internet. :) i will update my post tomorrow (about to be off for today), and credit you.
I wonder if a PR should be made to lograge README using filtered_parameters
... although not sure anyone's around to merge it...