mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- don't use initialize
This commit is contained in:
parent
6526dd9220
commit
9e06b92d64
1 changed files with 6 additions and 11 deletions
|
@ -57,17 +57,6 @@ class LogStash::Inputs::File < LogStash::Inputs::Base
|
|||
# has no effect.
|
||||
config :start_position, :validate => [ "beginning", "end"], :default => "end"
|
||||
|
||||
public
|
||||
def initialize(params)
|
||||
super
|
||||
|
||||
@path.each do |path|
|
||||
if Pathname.new(path).relative?
|
||||
raise ArgumentError.new("File paths must be absolute, relative path specified: #{path}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
public
|
||||
def register
|
||||
require "addressable/uri"
|
||||
|
@ -84,6 +73,12 @@ class LogStash::Inputs::File < LogStash::Inputs::Base
|
|||
:logger => @logger,
|
||||
}
|
||||
|
||||
@path.each do |path|
|
||||
if Pathname.new(path).relative?
|
||||
raise ArgumentError.new("File paths must be absolute, relative path specified: #{path}")
|
||||
end
|
||||
end
|
||||
|
||||
if @sincedb_path.nil?
|
||||
if ENV["HOME"].nil?
|
||||
@logger.error("No HOME environment variable set, I don't know where " \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue