Skip to content

Commit

Permalink
Merge pull request #2253 from zvkemp/disable-logging-docs
Browse files Browse the repository at this point in the history
[docs] disable logger via /dev/null instead of AS::N.unsubscribe
  • Loading branch information
bf4 authored Jan 26, 2021
2 parents 8f38571 + be119b8 commit f495f44
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/general/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ ActiveModelSerializers.logger = Logger.new(STDOUT)
You can also disable the logger, just put this in `config/initializers/active_model_serializers.rb`:

```ruby
require 'active_model_serializers'
ActiveSupport::Notifications.unsubscribe(ActiveModelSerializers::Logging::RENDER_EVENT)
ActiveModelSerializers.logger = Logger.new(IO::NULL)
```

0 comments on commit f495f44

Please sign in to comment.