Class: RailsBand::ActiveRecord::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- RailsBand::ActiveRecord::LogSubscriber
- Defined in:
- lib/rails_band/active_record/log_subscriber.rb
Overview
The custom LogSubscriber for ActiveRecord.
Instance Method Summary collapse
- #deprecated_association(event) ⇒ Object
- #instantiation(event) ⇒ Object
- #sql(event) ⇒ Object
- #start_transaction(event) ⇒ Object
- #strict_loading_violation(event) ⇒ Object
- #transaction(event) ⇒ Object
Instance Method Details
#deprecated_association(event) ⇒ Object
36 37 38 |
# File 'lib/rails_band/active_record/log_subscriber.rb', line 36 def deprecated_association(event) consumer_of(__method__)&.call(Event::DeprecatedAssociation.new(event)) end |
#instantiation(event) ⇒ Object
24 25 26 |
# File 'lib/rails_band/active_record/log_subscriber.rb', line 24 def instantiation(event) consumer_of(__method__)&.call(Event::Instantiation.new(event)) end |
#sql(event) ⇒ Object
20 21 22 |
# File 'lib/rails_band/active_record/log_subscriber.rb', line 20 def sql(event) consumer_of(__method__)&.call(Event::Sql.new(event)) end |
#start_transaction(event) ⇒ Object
28 29 30 |
# File 'lib/rails_band/active_record/log_subscriber.rb', line 28 def start_transaction(event) consumer_of(__method__)&.call(Event::StartTransaction.new(event)) end |
#strict_loading_violation(event) ⇒ Object
16 17 18 |
# File 'lib/rails_band/active_record/log_subscriber.rb', line 16 def strict_loading_violation(event) consumer_of(__method__)&.call(Event::StrictLoadingViolation.new(event)) end |
#transaction(event) ⇒ Object
32 33 34 |
# File 'lib/rails_band/active_record/log_subscriber.rb', line 32 def transaction(event) consumer_of(__method__)&.call(Event::Transaction.new(event)) end |