lib/logstash/inputs/mongoprofile.rb in logstash-input-mongoprofile-0.1.5 vs lib/logstash/inputs/mongoprofile.rb in logstash-input-mongoprofile-0.1.6

- old
+ new

@@ -21,11 +21,11 @@ config :client_host, :validate => :string, :default => '127.0.0.1' public def register @host = Socket.gethostname - @controller = Controller.new(@host, @url, 'system.profile', 1000, @path, @client_host) + @controller = Controller.new(@host, @url, 'system.profile', 1000, @path, @client_host, @logger) end # def register def run(queue) @@ -144,14 +144,15 @@ File.read(@file_full_name) end end class Controller - def initialize(event, url, collection, limit, path, client_host) + def initialize(event, url, collection, limit, path, client_host, logger) @mongo_accessor = MongoAccessor.new(url, collection, client_host) @last_value_store = LastValueStore.new(path, collection) @document_parser = DocumentParser.new(event) @limit = limit + @logger = logger end def get_next_events last_date_value = @last_value_store.get_last_value \ No newline at end of file