class Railtie < ::Rails::Railtie

Inherits from
::Rails::Railtie

Hook into Rails startup process and replace Rails.logger with our custom hooks

Nested Classes and Modules

initializer
after_initialize
  1. Remove existing log subscribers for ActionController and ActionView

Definitions

def self.detach_log_subscriber(subscriber, namespace)

Detach a Rails log subscriber using the API appropriate for its implementation.

Signature

parameter subscriber Class

The log subscriber class to detach.

parameter namespace Symbol

The notification namespace the subscriber is attached to.

Implementation

def self.detach_log_subscriber(subscriber, namespace)
	if subscriber < ::ActiveSupport::LogSubscriber
		subscriber.detach_from(namespace)
	else
		::ActiveSupport.event_reporter.unsubscribe(subscriber)
	end
end