mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
hack to make running input plugins
This commit is contained in:
parent
215a40e401
commit
7e47e194ec
1 changed files with 10 additions and 0 deletions
|
@ -48,6 +48,16 @@ module LogStash
|
||||||
end
|
end
|
||||||
end # def sample
|
end # def sample
|
||||||
|
|
||||||
|
def input(&block)
|
||||||
|
require "logstash/config/file"
|
||||||
|
config = LogStash::Config::File.new(nil, @config_str)
|
||||||
|
agent = LogStash::Agent.new
|
||||||
|
it "looks good" do
|
||||||
|
inputs, filters, outputs = agent.instance_eval { parse_config(config) }
|
||||||
|
block.call(inputs)
|
||||||
|
end
|
||||||
|
end # def input
|
||||||
|
|
||||||
def agent(&block)
|
def agent(&block)
|
||||||
@agent_count ||= 0
|
@agent_count ||= 0
|
||||||
require "logstash/agent"
|
require "logstash/agent"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue