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
after_initialize- 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
subscriberClass The log subscriber class to detach.
-
parameter
namespaceSymbol 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