Class: LogStash::Inputs::LogCompletedFileHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/inputs/log_completed_file_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(log_completed_file_path) ⇒ LogCompletedFileHandler

Returns a new instance of LogCompletedFileHandler.



5
6
7
# File 'lib/logstash/inputs/log_completed_file_handler.rb', line 5

def initialize(log_completed_file_path)
  @log_completed_file_path = Pathname.new(log_completed_file_path)
end

Instance Method Details

#handle(path) ⇒ Object



9
10
11
# File 'lib/logstash/inputs/log_completed_file_handler.rb', line 9

def handle(path)
  @log_completed_file_path.open("a") { |fd| fd.puts(path) }
end