Sha256: 915ff2a84bd13a0f2f3869fc4ac56d3cc941d66311e3877facc86f2741ff3657
Contents?: true
Size: 951 Bytes
Versions: 7
Compression:
Stored size: 951 Bytes
Contents
module Logtail module Integrations module ActionController # Responsible for removing the default ActionController::LogSubscriber and installing # the LogtailLogSubscriber # # @private class LogSubscriber < Integrator def initialize require "action_controller" require "action_controller/log_subscriber" require "logtail-rails/action_controller/log_subscriber/logtail_log_subscriber" rescue LoadError => e raise RequirementNotMetError.new(e.message) end def integrate! return true if Logtail::Integrations::Rails::ActiveSupportLogSubscriber.subscribed?(:action_controller, LogtailLogSubscriber) Logtail::Integrations::Rails::ActiveSupportLogSubscriber.unsubscribe!(:action_controller, ::ActionController::LogSubscriber) LogtailLogSubscriber.attach_to(:action_controller) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems