mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- grab the config from the class itself
This commit is contained in:
parent
428ef83f33
commit
1d4d4c137a
1 changed files with 6 additions and 5 deletions
|
@ -136,12 +136,12 @@ class LogStashConfigDocGenerator
|
|||
# Monkeypatch the 'config' method to capture
|
||||
# Note, this monkeypatch requires us do the config processing
|
||||
# one at a time.
|
||||
LogStash::Config::Mixin::DSL.instance_eval do
|
||||
define_method(:config) do |name, opts={}|
|
||||
#LogStash::Config::Mixin::DSL.instance_eval do
|
||||
#define_method(:config) do |name, opts={}|
|
||||
#p name => opts
|
||||
attributes[name].merge!(opts)
|
||||
end
|
||||
end
|
||||
#attributes[name].merge!(opts)
|
||||
#end
|
||||
#end
|
||||
|
||||
# Loading the file will trigger the config dsl which should
|
||||
# collect all the config settings.
|
||||
|
@ -182,6 +182,7 @@ class LogStashConfigDocGenerator
|
|||
# descriptions are assumed to be markdown
|
||||
description = BlueCloth.new(@class_description).to_html
|
||||
|
||||
@attributes = klass.get_config
|
||||
sorted_attributes = @attributes.sort { |a,b| a.first.to_s <=> b.first.to_s }
|
||||
klassname = LogStash::Config::Registry.registry[@name].to_s
|
||||
name = @name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue