- Add fields and timestamp from to gelf

This commit is contained in:
Jordan Sissel 2010-11-17 20:29:21 +00:00
parent 9fdbe250a2
commit 9decdf7f03

View file

@ -25,6 +25,11 @@ class LogStash::Outputs::Gelf < LogStash::Outputs::Base
source = URI.parse(event.source)
gelf.host = source.host
gelf.file = source.path
event.fields.each do |name, value|
gelf.add_additional name, value
end
gelf.add_additional "@timestamp", event.timestamp
gelf.send
end # def event
end # class LogStash::Outputs::Stdout