diff --git a/CHANGELOG.md b/CHANGELOG.md index ad6232e2..7a669bed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/docs/general/logging.md b/docs/general/logging.md index 306bfd50..321bf5d8 100644 --- a/docs/general/logging.md +++ b/docs/general/logging.md @@ -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) +```