mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- one less use of Addressable::URI
This commit is contained in:
parent
892e6ec225
commit
e39b50a801
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue