Sha256: b054200e6f6e096f3a7a865e2514c19b4654db16c4047c32df6aa4a29c294cd9
Contents?: true
Size: 866 Bytes
Versions: 17
Compression:
Stored size: 866 Bytes
Contents
# patch the actioncontroller logsubscriber to set the action on the logjam logger as soon as it starts processing the request require 'action_controller/metal/instrumentation' require 'action_controller/log_subscriber' module ActionController #:nodoc: class LogSubscriber def start_processing(event) payload = event.payload params = payload[:params].except(*INTERNAL_PARAMS) format = payload[:format] format = format.to_s.upcase if format.is_a?(Symbol) controller = payload[:controller] action = payload[:action] full_name = "#{controller}##{action}" action_name = LogjamAgent.action_name_proc.call(full_name) LogjamAgent.request.fields[:action] = action_name info "Processing by #{full_name} as #{format}" info " Parameters: #{params.inspect}" unless params.empty? end end end
Version data entries
17 entries across 17 versions & 1 rubygems