ActiveSupport::LogSubscriber
# File lib/phusion_passenger/active_support3_extensions/init.rb, line 41 def self.install!(options, user_options) union_station_core = options["union_station_core"] app_group_name = options["app_group_name"] return false if !union_station_core || !options["analytics"] # If the Ruby interpreter supports GC statistics then turn it on # so that the info can be logged. GC.enable_stats if GC.respond_to?(:enable_stats) subscriber = self.new(user_options) UnionStationExtension.attach_to(:action_controller, subscriber) UnionStationExtension.attach_to(:active_record, subscriber) if defined?(ActiveSupport::Cache::Store) ActiveSupport::Cache::Store.instrument = true UnionStationExtension.attach_to(:active_support, subscriber) end PhusionPassenger.on_event(:starting_request_handler_thread) do if defined?(ActiveSupport::Cache::Store) # This flag is thread-local. ActiveSupport::Cache::Store.instrument = true end end if defined?(ActionDispatch::DebugExceptions) exceptions_middleware = ActionDispatch::DebugExceptions elsif defined?(ActionDispatch::ShowExceptions) exceptions_middleware = ActionDispatch::ShowExceptions end if exceptions_middleware if defined?(Rails) Rails.application.middleware.insert_after( exceptions_middleware, ExceptionLogger, union_station_core, app_group_name) end end if defined?(ActionController::Base) ActionController::Base.class_eval do include ACExtension end end if defined?(ActiveSupport::Benchmarkable) ActiveSupport::Benchmarkable.class_eval do include ASBenchmarkableExtension alias_method_chain :benchmark, :passenger end end return true end
# File lib/phusion_passenger/active_support3_extensions/init.rb, line 123 def cache_fetch_hit(event) PhusionPassenger.log_cache_hit(nil, event.payload[:key]) end
# File lib/phusion_passenger/active_support3_extensions/init.rb, line 127 def cache_generate(event) PhusionPassenger.log_cache_miss(nil, event.payload[:key], event.duration * 1000) end
# File lib/phusion_passenger/active_support3_extensions/init.rb, line 115 def cache_read(event) if event.payload[:hit] PhusionPassenger.log_cache_hit(nil, event.payload[:key]) else PhusionPassenger.log_cache_miss(nil, event.payload[:key]) end end
Generated with the Darkfish Rdoc Generator 2.