# Discourse logboekopties

**URL:** <https://meta.discourse.org/t/discourse-logging-options/177073>\
**Category:** Product Support\
**Created:** [23 januari 2021 om 21:22 UTC](https://meta.discourse.org/t/discourse-logging-options/177073 "2021-01-23T21:22:23Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [26 januari 2021 om 09:49 UTC](https://meta.discourse.org/t/discourse-logging-options/177073/6 "2021-01-26T09:49:21Z")

</div>

To filter a specific parameter in Rails, you can do this (old method before “filter\_attributes”, see below) via a plugin:

```ruby
Rails.application.config.filter_parameters += [
  :raw,
  :signature,
  :return_url,
  :api_url,
  :access_token_url,
  :code
]

```

You can also use:

```plaintext
 filter_attributes

```

See also `filter_attributes` and other good info on this here:

> **[rails 6: Prevents logging sensitive info accidentally](https://dev.to/shivashankarror/rails-6-prevents-logging-sensitive-info-accidentally-8c5)**
>
> Introduction In Rails generally we filter out sensitive params getting logged in the logs....

Hope this helps @sbernhard

See also:

> **[Rails 6 adds ActiveSupport::ParameterFilter](https://blog.saeloun.com/2019/12/03/rails-6-adds-activesupport-parameter-filter)**
>
> Rails 6 has moved ParameterFilter from ActionDispatch to ActiveSupport in order to support filtered attributes with ActiveRecord::Relation#inspect.

---

_[View the full topic](https://meta.discourse.org/t/discourse-logging-options/177073)._
