lib/logstasher/log_subscriber.rb in logstasher-0.2.8 vs lib/logstasher/log_subscriber.rb in logstasher-0.3.0
- old
+ new
@@ -11,11 +11,12 @@
data.merge! runtimes(event)
data.merge! location(event)
data.merge! extract_exception(payload)
data.merge! extract_custom_fields(payload)
- event = LogStash::Event.new('@fields' => data, '@tags' => ['request'])
- event.tags << 'exception' if payload[:exception]
+ tags = ['request']
+ tags.push('exception') if payload[:exception]
+ event = LogStash::Event.new('@fields' => data, '@tags' => tags)
LogStasher.logger << event.to_json + "\n"
end
def redirect_to(event)
Thread.current[:logstasher_location] = event.payload[:location]