- one less use of Addressable::URI

This commit is contained in:
Jordan Sissel 2013-05-01 05:31:13 +00:00
parent 892e6ec225
commit e39b50a801

View file

@ -125,8 +125,9 @@ class LogStash::Inputs::File < LogStash::Inputs::Base
hostname = Socket.gethostname
@tail.subscribe do |path, line|
source = Addressable::URI.new(:scheme => "file", :host => hostname, :path => path).to_s
@logger.debug("Received line", :path => path, :line => line)
#source = Addressable::URI.new(:scheme => "file", :host => hostname, :path => path).to_s
source = "file://#{hostname}/#{path.gsub("\\","/")}"
@logger.debug? && @logger.debug("Received line", :path => path, :line => line)
e = to_event(line, source)
if e
queue << e