- The plain codec splits by line, and filewatch emits blobs without

newlines right now, so tack on a newline until filewatch gets
  refactored to emit blobs instead of lines.
This commit is contained in:
Jordan Sissel 2013-07-22 13:44:37 -07:00
parent 2a19fb9a84
commit d39e64f60b

View file

@ -125,7 +125,7 @@ class LogStash::Inputs::File < LogStash::Inputs::Base
@tail.subscribe do |path, line| @tail.subscribe do |path, line|
source = "file://#{hostname}/#{path.gsub("\\","/")}" source = "file://#{hostname}/#{path.gsub("\\","/")}"
@logger.debug? && @logger.debug("Received line", :path => path, :line => line) @logger.debug? && @logger.debug("Received line", :path => path, :line => line)
@codec.decode(line) do |event| @codec.decode(line + "\n") do |event|
event["source"] = source event["source"] = source
queue << event queue << event
end end