mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-19 13:31:03 +02:00
Merge pull request #200 from fluent/fix-configure-handling-in-regexp-preview
Use Config::Element instead of raw Hash
This commit is contained in:
commit
ac9457bf2b
@ -18,7 +18,7 @@ module RegexpPreview
|
|||||||
else # apache, nginx, etc
|
else # apache, nginx, etc
|
||||||
definition = Fluent::TextParser::TEMPLATE_REGISTRY.lookup(format).call
|
definition = Fluent::TextParser::TEMPLATE_REGISTRY.lookup(format).call
|
||||||
raise "Unknown format '#{format}'" unless definition
|
raise "Unknown format '#{format}'" unless definition
|
||||||
definition.configure({}) # NOTE: SyslogParser define @regexp in configure method so call it to grab Regexp object
|
definition.configure(Fluent::Config::Element.new('ROOT', '', {}, [])) # NOTE: SyslogParser define @regexp in configure method so call it to grab Regexp object
|
||||||
@regexp = definition.patterns["format"]
|
@regexp = definition.patterns["format"]
|
||||||
@time_format = definition.patterns["time_format"]
|
@time_format = definition.patterns["time_format"]
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user