title: Rails Logs. How to hide in logs all params from a specific controller?
body: <p>I have a rails 6 app with a Update controller ready for accept JSON Post Requests:</p>
  
  <pre class="lang-rb prettyprint-override"><code>class ProcessLogsController &lt; ApplicationController
    #...
  
    # POST /process_logs.json
    def create
     # ... code to save the json in a database ...
    end
  
    #...
  end
  </code></pre>
  
  <p>When a make a Post request with the JSON as a body...</p>
  
  <pre class="lang-sh prettyprint-override"><code>curl -X POST \
    http://localhost:3000/process_logs.json \
    -H 'Content-Type: application/json' \
    -d '{
      "Time": "A UNIX timestamp",
      "Message": "Host Message could be very long, and may include secret info",
      "host": "My Hostname" 
  }'
  </code></pre>
  
  <p>I got this in the Logs:</p>
  
  <pre class="lang-sh prettyprint-override"><code>Started POST "/process_logs.json" for ::1 at 2019-08-13 20:16:37 -0500
  Processing by ProcessLogsController#create as JSON
    Parameters: {"Time"=&gt;"A UNIX timestamp", "Message"=&gt;"[FILTERED]", "host"=&gt;"My Hostname", "process_log"=&gt;{"Time"=&gt;"A UNIX timestamp", "Message"=&gt;"[FILTERED]", "host"=&gt;"My Hostname"}}
    Rendering text template
    Rendered text template (Duration: 0.2ms | Allocations: 1)
  Completed 200 OK in 4ms (Views: 1.7ms | Allocations: 227)
  </code></pre>
  
  <p>The output is correct and expected, but I have this corncern with my log:</p>
  
  <ul>
  <li>The <strong>Parameters</strong> (Line 3) it have the JSON request twice, one for the <em>request.body</em> and other for the <em>process_log</em> params.</li>
  <li>This controller could have millions of request in a day. And coud have much more keys in the JSON post</li>
  </ul>
  
  <p>So my question is...</p>
  
  <p>Is any way to disable/hide the line <strong>Parameters</strong> on the log for this specific <em>controller#action</em>.</p>
  
  <p>I don't want to set the level to :warn because I want to view the other info (Respose code etc..)</p>