lib/logstasher/rails_ext/action_controller/metal/instrumentation.rb in logstasher-0.1.0 vs lib/logstasher/rails_ext/action_controller/metal/instrumentation.rb in logstasher-0.1.1

- old
+ new

@@ -10,11 +10,13 @@ :path => (request.fullpath rescue "unknown") } if Logstasher.payload_appender before_keys = raw_payload.keys.clone - Logstasher.payload_appender.call(self, request, raw_payload) + # Execue the payload appened in current context + self.instance_exec raw_payload, &Logstasher.payload_appender after_keys = raw_payload.keys + # Add to payload all extra keys added to payload hash raw_payload[:log_stasher_appended_param_keys] = after_keys - before_keys end ActiveSupport::Notifications.instrument("start_processing.action_controller", raw_payload.dup) \ No newline at end of file