title: Manually filter parameters in Rails
body: <p>How would I go about manually filtering a hash using my application's parameter filter?</p>
  
  <p>I imagine it'd go like this:</p>
  
  <pre><code>Rails.application.filter :password =&gt; 'pass1234'
    # =&gt; {:password =&gt; '[FILTERED]'}
  </code></pre>
  
  <p><strong>EDIT (clarification):</strong> I'm aware that Rails filters the <code>params</code> hash when writing to the logs. What I want to do is apply that same filter to a different hash at my prerogative before writing it to the logs with something like <code>Rails.logger.info</code>. I'm calling a remote HTTP query as a part of my application (since most of the backend operates through a remote API), and I'm logging the URL and parameters passed. I want to have the logs but also ensure that none of the sensitive params show up there.</p>