How can I filter sensitive parameters from the SQL portion of Rails 5 logs? : <p>Rails 5 offers parameter filtering, and I've specified <code>config.filter_parameters += ["my_token"]</code> in <code>application.rb</code>.</p>

<p>Testing my app in dev (environment) mode, I see <code>my_token</code> is correctly filtered from the request lines of the log file:</p>

<p><code>Started GET "/something?my_token=[FILTERED]"</code></p>

<p>However, the SQL log lines immediately following still include the parameter's value in plain text ("SELECT stuff FROM things," etc., with <code>my_token</code> as a param).</p>

<p>Does Rails 5 offer a way to filter this raw value from the SQL part of its log files?</p>

<p>I've also run my app in production mode, and though the log files are more succinct, they still display the value unfiltered in D-type log lines for the generated SQL statements.</p>

<p>I've specified no custom log settings--everything other than my filter parameter setting is by default.</p>

<p>My own search showed no relevant discussion of this. Maybe I'm missing something?</p>

<p>Thx!</p>
