prevent overwrite of event host field

Closes #1668
This commit is contained in:
Fredrik Gustafsson 2014-08-27 10:10:17 +02:00 committed by Suyog Rao
parent 56dbbff8a8
commit 2efad5bffe

View file

@ -27,7 +27,7 @@ class LogStash::Inputs::Stdin < LogStash::Inputs::Base
data = $stdin.sysread(16384)
@codec.decode(data) do |event|
decorate(event)
event["host"] = @host
event["host"] = @host if !event.include?("host")
queue << event
end
rescue EOFError, LogStash::ShutdownSignal