lib/logstash/inputs/exec.rb in logstash-input-exec-2.0.6 vs lib/logstash/inputs/exec.rb in logstash-input-exec-3.0.0
- old
+ new
@@ -77,11 +77,11 @@
@logger.info? && @logger.info("Running exec", :command => command)
begin
@io = IO.popen(command)
@codec.decode(@io.read) do |event|
decorate(event)
- event["host"] = @hostname
- event["command"] = command
+ event.set("host", @hostname)
+ event.set("command", command)
queue << event
end
rescue StandardError => e
@logger.error("Error while running command",
:command => command, :e => e, :backtrace => e.backtrace)