8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/logjam_agent/rack/rails_support.rb', line 8
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)
format = "*/*" if format.nil?
controller = payload[:controller]
action = payload[:action]
full_name = "#{controller}##{action}"
action_name = LogjamAgent.action_name_proc.call(full_name)
request = LogjamAgent.request
request.fields[:action] = action_name
request.log_info[:action] = action
request.log_info[:controller] = controller
request.log_info[:format] = format
LogjamAgent.logjam_only do
info "Processing by #{full_name} as #{format}"
info " Parameters: #{params.inspect}" unless params.empty?
end
end
|