logging URI query params with lograge : ruby Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts Search within r/rubyr/ruby Log InSign Up User account menu 11 logging URI query params with lograge Close 11 Posted by10 days ago logging URI query params with lograge bibwild.wordpress.com/2021/0... 6 commentsshare save hide report Sort by: best View all comments level 1 · 10d · edited 9d *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. 2 ReplyShare ReportSave level 2 Op · 10d · edited 9d 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... 2 ReplyShare ReportSave View Entire Discussion (6 Comments) More posts from the ruby community Continue browsing in r/ruby r/ruby Welcome to ruby 72.3k Members 63 Online Created Jan 25, 2008 Join helpReddit coinsReddit premiumReddit gifts aboutcareerspressadvertiseblogTermsContent policyPrivacy policyMod policy Reddit Inc © 2021 . All rights reserved Back to Top