mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
- delay require until the register method
This commit is contained in:
parent
fc4bb3af9e
commit
c2ea10ed5d
1 changed files with 7 additions and 2 deletions
|
@ -7,8 +7,10 @@ Dir["/home/jls/build/elasticsearch-0.15.0//lib/*.jar"].each do |jar|
|
||||||
require jar
|
require jar
|
||||||
end
|
end
|
||||||
|
|
||||||
gem "jruby-elasticsearch", ">= 0.0.3"
|
jarpath = File.join(File.dirname(__FILE__), "../../../vendor/**/*.jar")
|
||||||
require "jruby-elasticsearch"
|
Dir[jarpath].each do |jar|
|
||||||
|
require jar
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
class LogStash::Outputs::Elasticsearch < LogStash::Outputs::Base
|
class LogStash::Outputs::Elasticsearch < LogStash::Outputs::Base
|
||||||
|
@ -22,6 +24,9 @@ class LogStash::Outputs::Elasticsearch < LogStash::Outputs::Base
|
||||||
|
|
||||||
public
|
public
|
||||||
def register
|
def register
|
||||||
|
gem "jruby-elasticsearch", ">= 0.0.3"
|
||||||
|
require "jruby-elasticsearch"
|
||||||
|
|
||||||
@pending = []
|
@pending = []
|
||||||
@callback = self.method(:receive_native)
|
@callback = self.method(:receive_native)
|
||||||
# TODO(sissel): host/port? etc?
|
# TODO(sissel): host/port? etc?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue