Skip to content

Commit

Permalink
Remove unused capture
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <[email protected]>
  • Loading branch information
ganmacs committed Mar 23, 2020
1 parent 5510b8f commit 8c6b8bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/fluent/plugin/parser_syslog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SyslogParser < Parser

RFC5424_WITHOUT_TIME_AND_PRI_REGEXP = /(?<host>[!-~]{1,255}) (?<ident>[!-~]{1,48}) (?<pid>[!-~]{1,128}) (?<msgid>[!-~]{1,32}) (?<extradata>(?:\-|(?:\[.*?(?<!\\)\])+))(?: (?<message>.+))?\z/m
RFC5424_CAPTURES = RFC5424_WITHOUT_TIME_AND_PRI_REGEXP.names.freeze
RFC5424_PRI_REGEXP = /^<(?<pri>\d{1,3})>(?<version>\d\d{0,2})\s/
RFC5424_PRI_REGEXP = /^<(?<pri>\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'
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8c6b8bd

Please sign in to comment.