mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- Fix event appending.
This commit is contained in:
parent
fd05fccca6
commit
93434a7171
1 changed files with 5 additions and 3 deletions
|
@ -79,10 +79,12 @@ module LogStash; class Event
|
|||
|
||||
# Append all fields
|
||||
event.fields.each do |name, value|
|
||||
if event.fields.include?(name)
|
||||
event.fields[name] |= value
|
||||
if self.fields.include?(name)
|
||||
puts "Merging field #{name}"
|
||||
self.fields[name] |= value
|
||||
else
|
||||
event.fields[name] = value
|
||||
puts "Setting field #{name}"
|
||||
self.fields[name] = value
|
||||
end
|
||||
end # event.fields.each
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue