From 68f8ebedf42d3000112322760b4f0a99c09b343e Mon Sep 17 00:00:00 2001 From: MSathieu Date: Tue, 17 Jan 2017 17:43:22 +0100 Subject: [PATCH 1/4] Update logging.md --- docs/general/logging.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/general/logging.md b/docs/general/logging.md index 306bfd506..9fba8c28b 100644 --- a/docs/general/logging.md +++ b/docs/general/logging.md @@ -12,3 +12,9 @@ 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/application.rb`: + +```ruby +ActiveSupport::Notifications.unsubscribe(ActiveModelSerializers::Logging::RENDER_EVENT) +``` From 3d44bfcf2880f7b2a5d2ad0f4262397bfbfef01a Mon Sep 17 00:00:00 2001 From: MSathieu Date: Tue, 17 Jan 2017 18:21:21 +0100 Subject: [PATCH 2/4] Update logging.md --- docs/general/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/general/logging.md b/docs/general/logging.md index 9fba8c28b..1a2de8000 100644 --- a/docs/general/logging.md +++ b/docs/general/logging.md @@ -13,7 +13,7 @@ You may customize the logger in an initializer, for example: ActiveModelSerializers.logger = Logger.new(STDOUT) ``` -You can also disable the logger, just put this in `config/application.rb`: +You can also disable the logger, just put this in `config/initializers/active_model_serializers.rb`: ```ruby ActiveSupport::Notifications.unsubscribe(ActiveModelSerializers::Logging::RENDER_EVENT) From ab98c4a664f26077e5b3c90ea6bcbe129ec2d0b9 Mon Sep 17 00:00:00 2001 From: MSathieu Date: Sun, 22 Jan 2017 13:14:19 +0100 Subject: [PATCH 3/4] Update logging.md --- docs/general/logging.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/general/logging.md b/docs/general/logging.md index 1a2de8000..321bf5d8b 100644 --- a/docs/general/logging.md +++ b/docs/general/logging.md @@ -16,5 +16,6 @@ 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) ``` From bd50ae9ada686f179e8f06a497bfe948a7201e53 Mon Sep 17 00:00:00 2001 From: MSathieu Date: Mon, 23 Jan 2017 07:24:41 +0100 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b025a61bb..9526d3095 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) ### [v0.10.4 (2017-01-06)](https://github.com/rails-api/active_model_serializers/compare/v0.10.3...v0.10.4)