mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
- 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:
parent
16ad0f80f7
commit
513df922c5
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue