From 8c6b8bda1e0f56f6ba79f068ed99ecd47827f87b Mon Sep 17 00:00:00 2001 From: Yuta Iwama Date: Mon, 23 Mar 2020 18:23:21 +0900 Subject: [PATCH] Remove unused capture Signed-off-by: Yuta Iwama --- lib/fluent/plugin/parser_syslog.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/fluent/plugin/parser_syslog.rb b/lib/fluent/plugin/parser_syslog.rb index 82263330ec..bd51492342 100644 --- a/lib/fluent/plugin/parser_syslog.rb +++ b/lib/fluent/plugin/parser_syslog.rb @@ -46,7 +46,7 @@ class SyslogParser < Parser RFC5424_WITHOUT_TIME_AND_PRI_REGEXP = /(?[!-~]{1,255}) (?[!-~]{1,48}) (?[!-~]{1,128}) (?[!-~]{1,32}) (?(?:\-|(?:\[.*?(?.+))?\z/m RFC5424_CAPTURES = RFC5424_WITHOUT_TIME_AND_PRI_REGEXP.names.freeze - RFC5424_PRI_REGEXP = /^<(?\d{1,3})>(?\d\d{0,2})\s/ + RFC5424_PRI_REGEXP = /^<(?\d{1,3})>\d\d{0,2}\s/ config_set_default :time_format, "%b %d %H:%M:%S" desc 'If the incoming logs have priority prefix, e.g. <9>, set true' @@ -176,7 +176,6 @@ def parse_rfc5424_regex(text, &block) if @with_priority if (m = RFC5424_PRI_REGEXP.match(text)) record['pri'] = m['pri'] - record['version'] = m['version'] idx = m.end(0) else yield(nil, nil)