Sha256: 0e77e10b1249e393f0041e83b0c03504f2c6f0ab588e8b8885b8dc3a7aee801d
Contents?: true
Size: 913 Bytes
Versions: 12
Compression:
Stored size: 913 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/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
12 entries across 12 versions & 1 rubygems