Sha256: 309874c3f9e66df833faf040cd716056a098f596c74282fd6c83f2f4a29e642c
Contents?: true
Size: 685 Bytes
Versions: 3
Compression:
Stored size: 685 Bytes
Contents
ActionController::LogSubscriber module ActionController class LogSubscriber # Log as info to show Processing messages in production def start_processing(event) controller_logger(event).info { "Processing ##{event.payload[:action]}" } end private # Returns the logger for the supplied event. # Returns ActionController::Base.logger if no controller is present def controller_logger(event) if controller = event.payload[:controller] begin controller.constantize.logger rescue NameError ActionController::Base.logger end else ActionController::Base.logger end end end end
Version data entries
3 entries across 3 versions & 1 rubygems