diff options
author | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2019-07-16 12:10:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-16 12:10:37 -0400 |
commit | 85b422bd7fcb93c6a3d13f78fca55b85f69865a1 (patch) | |
tree | 5c012e36eb9d92691f9304d47459383ee264b934 /activesupport | |
parent | da4e18c5c2e965bfdfc442b92881326453de6f80 (diff) | |
parent | 171965810e05ffb8221c9c4d26c28c42a43ccd22 (diff) | |
download | rails-85b422bd7fcb93c6a3d13f78fca55b85f69865a1.tar.gz rails-85b422bd7fcb93c6a3d13f78fca55b85f69865a1.tar.bz2 rails-85b422bd7fcb93c6a3d13f78fca55b85f69865a1.zip |
Merge pull request #36667 from gmcgibbon/clarify_logger_set_in_log_subscriber_docs
Specify log subscribers need a logger set before they can receive events
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/log_subscriber.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/log_subscriber.rb b/activesupport/lib/active_support/log_subscriber.rb index db991c7a32..8b9dd1fffe 100644 --- a/activesupport/lib/active_support/log_subscriber.rb +++ b/activesupport/lib/active_support/log_subscriber.rb @@ -29,6 +29,9 @@ module ActiveSupport # subscriber, the line above should be called after your # <tt>ActiveRecord::LogSubscriber</tt> definition. # + # A logger also needs to be set with <tt>ActiveRecord::LogSubscriber.logger=</tt>. + # This is assigned automatically in a Rails environment. + # # After configured, whenever a <tt>"sql.active_record"</tt> notification is published, # it will properly dispatch the event # (<tt>ActiveSupport::Notifications::Event</tt>) to the sql method. |