module ActionController

ActionController integration for Console logger. Provides log subscribers that convert Rails ActionController 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 events from ActiveSupport::Notifications and logs them to the console.

Definitions

def self.log_parameters?

Whether filtered request parameters should be included in action controller logs.

Signature

returns Boolean

Whether filtered request parameters are logged.

Implementation

def self.log_parameters?
	@log_parameters
end

def self.log_parameters=(value)

Configure whether filtered request parameters should be included in action controller logs.

Signature

parameter value Boolean

Whether filtered request parameters should be logged.

Implementation

def self.log_parameters=(value)
	@log_parameters = value
end

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

Attach the log subscriber to ActionController events.

Signature

parameter notifications ActiveSupport::Notifications

The notifications system to attach to.

Implementation

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