- don't use initialize

This commit is contained in:
Jordan Sissel 2013-05-02 17:47:01 -07:00
parent 6526dd9220
commit 9e06b92d64

View file

@ -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 " \