diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-12-11 17:22:12 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-12-11 17:22:12 +0100 |
commit | cf4d9aa992f99ca19fd32446d081ba7d145fbeae (patch) | |
tree | f16d0a3985dc40ae8b5013ebeca1e7e188b1b530 /lib/action_cable/server | |
parent | 2b4aa9a173eeda96a8d827c5bdd9ad8e41e6abf1 (diff) | |
parent | 43c6c7787954d959347a1f90d71b11ba0cb7a8c7 (diff) | |
download | rails-cf4d9aa992f99ca19fd32446d081ba7d145fbeae.tar.gz rails-cf4d9aa992f99ca19fd32446d081ba7d145fbeae.tar.bz2 rails-cf4d9aa992f99ca19fd32446d081ba7d145fbeae.zip |
Merge pull request #125 from lsylvester/handle-custom-loggers
Handle cases where logger is not a tagged logger.
Diffstat (limited to 'lib/action_cable/server')
-rw-r--r-- | lib/action_cable/server/worker/active_record_connection_management.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/action_cable/server/worker/active_record_connection_management.rb b/lib/action_cable/server/worker/active_record_connection_management.rb index 1ede0095f8..ecece4e270 100644 --- a/lib/action_cable/server/worker/active_record_connection_management.rb +++ b/lib/action_cable/server/worker/active_record_connection_management.rb @@ -12,7 +12,7 @@ module ActionCable end def with_database_connections - ActiveRecord::Base.logger.tagged(*connection.logger.tags) { yield } + connection.logger.tag(ActiveRecord::Base.logger) { yield } ensure ActiveRecord::Base.clear_active_connections! end |