- For sanity in chaining, we should not override an event.type if we already

have one (for example, if we get an event over amqp, we should not override the
  type).
This commit is contained in:
Jordan Sissel 2010-11-12 03:47:52 +00:00
parent 16ad0f80f7
commit 513df922c5

View file

@ -24,7 +24,8 @@ class LogStash::Inputs::Base
def receive(event)
@logger.debug(["Got event", { :url => @url, :event => event }])
event.type = @type
# Only override the type if it doesn't have one
event.type = @type if !event.type
event.tags |= @tags # set union
@callback.call(event)
end