Skip to content

Commit

Permalink
Fix RFC detection regex to match parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael "M3" Lasevich authored and Michael "M3" Lasevich committed Mar 12, 2020
1 parent 73955e2 commit 6ac1740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/parser_syslog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SyslogParser < Parser
REGEXP_RFC5424_WITH_PRI = Regexp.new(<<~'EOS'.chomp % REGEXP_RFC5424, Regexp::MULTILINE)
\A<(?<pri>[0-9]{1,3})\>[1-9]\d{0,2} %s\z
EOS
REGEXP_DETECT_RFC5424 = /^\<.*\>[1-9]\d{0,2}/
REGEXP_DETECT_RFC5424 = /^\<[0-9]{1,3}\>[1-9]\d{0,2}/

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

0 comments on commit 6ac1740

Please sign in to comment.