From ed260c2a70b8f9cb5bab8db1cced94772eff2cc3 Mon Sep 17 00:00:00 2001 From: Masahiro Nakagawa Date: Thu, 25 Feb 2016 07:37:05 +0900 Subject: [PATCH] Use Config::Element instead of raw Hash --- lib/regexp_preview/single_line.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/regexp_preview/single_line.rb b/lib/regexp_preview/single_line.rb index 1981e732f..e0c32d8fa 100644 --- a/lib/regexp_preview/single_line.rb +++ b/lib/regexp_preview/single_line.rb @@ -18,7 +18,7 @@ def initialize(file, format, params = {}) else # apache, nginx, etc definition = Fluent::TextParser::TEMPLATE_REGISTRY.lookup(format).call 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"] @time_format = definition.patterns["time_format"] end