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 LogSubscriber

Represents a Rails log subscriber which is compatible with Console::Logger. It receives SQL events from ActiveSupport::Notifications and logs them to the console.

Definitions

def self.apply!(notifications: ActiveSupport::Notifications)

Attach the log subscriber to ActiveRecord events.

Signature

parameter notifications ActiveSupport::Notifications

The notifications system to attach to.

Implementation

def self.apply!(notifications: ActiveSupport::Notifications)
	LogSubscriber.attach_to(:active_record, LogSubscriber.new, notifications)
end