Skip to content

Commit 2d1c680

Browse files
authored
Merge pull request #2035 from MSathieu/patch-1
Update logging documentation
2 parents ab824e2 + 1e47c16 commit 2d1c680

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Misc:
1616

1717
- [#2021](https://github.com/rails-api/active_model_serializers/pull/2021) Make test attributes explicit. Tests have Model#associations. (@bf4)
1818
- [#1981](https://github.com/rails-api/active_model_serializers/pull/1981) Fix relationship link documentation. (@groyoh)
19+
- [#2035](https://github.com/rails-api/active_model_serializers/pull/2035) Document how to disable the logger. (@MSathieu)
1920
- [#2039](https://github.com/rails-api/active_model_serializers/pull/2039) Documentation fixes. (@biow0lf)
2021

2122
### [v0.10.4 (2017-01-06)](https://github.com/rails-api/active_model_serializers/compare/v0.10.3...v0.10.4)

docs/general/logging.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,10 @@ You may customize the logger in an initializer, for example:
1212
```ruby
1313
ActiveModelSerializers.logger = Logger.new(STDOUT)
1414
```
15+
16+
You can also disable the logger, just put this in `config/initializers/active_model_serializers.rb`:
17+
18+
```ruby
19+
require 'active_model_serializers'
20+
ActiveSupport::Notifications.unsubscribe(ActiveModelSerializers::Logging::RENDER_EVENT)
21+
```

0 commit comments

Comments
 (0)