Merge pull request #2035 from MSathieu/patch-1

Update logging documentation
This commit is contained in:
Benjamin Fleischer 2017-01-31 09:23:41 -06:00 committed by GitHub
commit 2d1c68044e
2 changed files with 8 additions and 0 deletions

View File

@ -16,6 +16,7 @@ Misc:
- [#2021](https://github.com/rails-api/active_model_serializers/pull/2021) Make test attributes explicit. Tests have Model#associations. (@bf4)
- [#1981](https://github.com/rails-api/active_model_serializers/pull/1981) Fix relationship link documentation. (@groyoh)
- [#2035](https://github.com/rails-api/active_model_serializers/pull/2035) Document how to disable the logger. (@MSathieu)
- [#2039](https://github.com/rails-api/active_model_serializers/pull/2039) Documentation fixes. (@biow0lf)
### [v0.10.4 (2017-01-06)](https://github.com/rails-api/active_model_serializers/compare/v0.10.3...v0.10.4)

View File

@ -12,3 +12,10 @@ You may customize the logger in an initializer, for example:
```ruby
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)
```