module ActiveRecord
ActiveRecord integration for Console logger. Provides log subscribers that convert Rails ActiveRecord events into Console-compatible log messages.
Nested Classes and Modules
class LogSubscriberRepresents a Rails log subscriber which is compatible with
Console::Logger. It receives SQL events fromActiveSupport::Notificationsand logs them to the console.
Definitions
def self.apply!(notifications: ActiveSupport::Notifications)
Attach the log subscriber to ActiveRecord events.
Signature
-
parameter
notificationsActiveSupport::Notifications The notifications system to attach to.
Implementation
def self.apply!(notifications: ActiveSupport::Notifications)
LogSubscriber.attach_to(:active_record, LogSubscriber.new, notifications)
end