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 LogSubscriberRepresents a Rails log subscriber which is compatible with
Console::Logger. It receives events fromActiveSupport::Notificationsand 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
valueBoolean 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
notificationsActiveSupport::Notifications The notifications system to attach to.
Implementation
def self.apply!(notifications: ActiveSupport::Notifications)
LogSubscriber.attach_to(:action_controller, LogSubscriber.new, notifications)
end