lib/logstasher.rb in logstasher-1.3.0 vs lib/logstasher.rb in logstasher-1.4.0
- old
+ new
@@ -4,10 +4,11 @@
require 'logstasher/active_record/log_subscriber' if defined?(ActiveRecord)
require 'logstasher/action_view/log_subscriber' if defined?(ActionView)
require 'logstasher/active_job/log_subscriber' if defined?(ActiveJob)
require 'logstasher/rails_ext/action_controller/base'
require 'logstasher/custom_fields'
+require 'logstasher/event'
require 'request_store'
require 'active_support/core_ext/module/attribute_accessors'
require 'active_support/core_ext/string/inflections'
require 'active_support/ordered_options'
@@ -179,10 +180,10 @@
def build_logstash_event(data, tags)
field_renaming.each do |old_name, new_name|
data[new_name] = data.delete(old_name) if data.key?(old_name)
end
- ::LogStash::Event.new(data.merge('source' => self.source, 'tags' => tags))
+ Event.new(data.merge('source' => self.source, 'tags' => tags))
end
def store
if RequestStore.store[STORE_KEY].nil?
# Get each store it's own private Hash instance.